Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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/triggers.html

Comment 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.

...

  1. 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>

  2. 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>

  3. 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

- project:
     ...
     jobs:
      - '{project-name}-{stream}-stage-site-java':
          site-pom: 'pom.xml'
          trigger-job: '{project-name}-{stream}-release-version-java-daily'
     ...

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.

...