...
As a picture is worth few lines, here are both in one:
...
Using Jenkins Job Builder, we describe projects that contains jobs. Those jobs are mainly based on templates.
And to describe both, you have access to user defined macros and variables.
...
http://docs.openstack.org/infra/jenkins-job-builder/properties.html
parameters
This section provides allows you to setup build parameters for the Jenkins job.
http://docs.openstack.org/infra/jenkins-job-builder/parameters.html
scm
This section provides information about which repo should be fetched, and how. In the example case, the gerrit-trigger-scm
is a macro that contains the gerrit definition to fetch a repo.
http://docs.openstack.org/infra/jenkins-job-builder/scm.html
parameters
...
wrappers
Wrappers are intended to change the behaviour of the build. See the official documentation in case you might need them.
http://docs.openstack.org/infra/jenkins-job-builder/parameterswrappers.html
scm
...
triggers
As there's no manual execution of the jobs (except on special request), the triggers describe how and when the build should be executed.
Most interesting ones are:
- time based (cron like) triggers
- gerrit event specific triggers
- by pathc submmitted or merged
- by comment posted
http://docs.openstack.org/infra/jenkins-job-builder/scmtriggers.html
wrappers
Wrappers are intended to change the behaviour of the build. See the official documentation in case you might need them.
http://docs.openstack.org/infra/jenkins-job-builder/wrappers.html
triggers
As there's no manual execution of the jobs (except on special request), the triggers describe how and when the build should be executed.
Most interesting ones are:
- time based (cron like) triggers
- gerrit event specific triggers
http://docs.openstack.org/infra/jenkins-job-builder/triggers.htmlComment posted triggers
Gerrit comments also trigger most builds. The current comments supported are:
"run-sonar" - to trigger the Sonar scan job
"run-clm" - to trigger the IQ scan
"reverify" - to trigger a verification on an unmerged change
"remerge" - to trigger a merge job, useful whenever the automated merge job fails
"please release" - to trigger the daily release job to post binaries in Nexus.
For more detail on how these triggers are configured, please refer to:
https://github.com/onap/ci-management
builders
The builders is the build configuration of the projects. It will be mapped to the jenkins Build section of the job configuration.
...
Here is the specific step that does the sonar scan in this profile, in case you need to add it to a new profile :
In your pom.xml, add this plugin configuration (for more information on plugin parameters, please refer to http://docs.sonarqube.org/):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.2</version>
</plugin>
...
JavaDoc
This explains how to configure your project to upload the javadoc to the Linux Foundation Nexus.
...
To allow javadoc generation, add the maven-javadoc-plugin to your project pom.xml :
<
reporting
>
<
plugins
>
<
plugin
>
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-javadoc-plugin</
artifactId
>
<
version
>2.10.4</
version
>
<
configuration
>
<
failOnError
>false</
failOnError
>
<
doclet
>org.umlgraph.doclet.UmlGraphDoc</
doclet
>
<
docletArtifact
>
<
groupId
>org.umlgraph</
groupId
>
<
artifactId
>umlgraph</
artifactId
>
<
version
>5.6</
version
>
</
docletArtifact
>
<
additionalparam
>-views</
additionalparam
>
<
useStandardDocletOptions
>true</
useStandardDocletOptions
>
</
configuration
>
</
plugin
>
</
plugins
>
</
reporting
>
Add the maven-site plugin :
<
plugin
>
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-site-plugin</
artifactId
>
<
version
>3.6</
version
>
<
dependencies
>
<
dependency
>
<
groupId
>org.apache.maven.wagon</
groupId
>
<
artifactId
>wagon-webdav-jackrabbit</
artifactId
>
<
version
>2.10</
version
>
</
dependency
>
</
dependencies
>
</
plugin
>
Distribution management setup :
<
properties
>
...
<
nexusproxy
>https://nexus.onap.org</
nexusproxy
>
<
sitePath
>/content/sites/site/org/onap/mso/${project.version}</
sitePath
>
...
</
properties
>
<
distributionManagement
>
<
site
>
<
id
>ecomp-site</
id
>
<
url
>dav:${nexusproxy}${sitePath}</
url
>
</
site
>
</
distributionManagement
>
Be sure to use ecomp-site as id for your site, so that it matches the server credentials provided by the Linux Foundation.
...
Add the following lines to your projects yaml definition :
project.yaml
|
The added job(s) will be triggered when trigger-job ends successfully. This allow to publish the staging version documentation only when the staging release build succeeds and avoid overwriting the current documentation. The template {project-name}-{stream}-stage-site-java actually invokes mvn site:site and mvn site:stage-deploy on your project using the pom.xml specified as site-pom.
...