Update automated project templates
[releng/builder.git] / jjb / snmp4sdn / snmp4sdn.yaml
index 3217d05d5753955f86cb9e6e9adfb388df39f760..bb56defcc9a015e8993bd05461e3985494f1dc33 100644 (file)
         - 'snmp4sdn-distribution-{stream}'
         - 'snmp4sdn-integration-{stream}'
         - 'snmp4sdn-sonar'
-        - 'snmp4sdn-clm'
+        - 'snmp4sdn-clm-{stream}'
 
 
-    # stream:    branch with - in place of / (eg. stable-helium)
-    # branch:    branch (eg. stable/helium)
+    # stream:    release stream (eg. stable-lithium or beryllium)
+    # branch:    git branch (eg. stable/lithium or master)
     stream:
-        - master:
+        - beryllium:
             branch: 'master'
             jdk: openjdk7
             jdks:
                 - openjdk7
-        - stable-helium:
-            branch: 'stable/helium'
+        - stable-lithium:
+            branch: 'stable/lithium'
             jdk: openjdk7
             jdks:
                 - openjdk7
-        - stable-lithium:
-            branch: 'stable/lithium'
+        - stable-helium:
+            branch: 'stable/helium'
             jdk: openjdk7
             jdks:
                 - openjdk7
@@ -37,7 +37,8 @@
     project: 'snmp4sdn'
 
 # For the Job templates below replace instances of:
-# PROJECT with your project name (eg. controller)
+# PROJECT_SHORTNAME with your project name (eg. circuitsw)
+# PROJECT_PATH with your project name (eg. ofextensions/circuitsw)
 # MAVEN_GOALS with your maven goals to build
 # MAVEN_OPTS with your maven options to build
 
@@ -49,8 +50,8 @@
     # The purpose of this job template is to setup a ODL verify job
     #
     # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable-helium)
-    #     branch:    branch (eg. stable/helium)
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
 
     project-type: matrix
     node: matrix_master
 
     builders:
         - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
         - maven-target:
-            maven-version: '{mvn32}'
+            maven-version: '{mvn33}'
             pom: 'pom.xml'
-            goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r '
+            goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dstream={stream}'
             java-opts:
                 - '-Xmx1024m -XX:MaxPermSize=256m'
             settings: '{snmp4sdn-settings}'
             global-settings: '{odl-global-settings}'
-        - jacoco-nojava-workaround
 
     publishers:
         - findbugs
     # and deploy artifacts to Nexus.
     #
     # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable-helium)
-    #     branch:    branch (eg. stable/helium)
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
 
     project-type: maven
     node: dynamic_merge
 
     prebuilders:
         - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
 
     maven:
-        maven-name: '{mvn32}'
+        maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  source:jar javadoc:jar'
+        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dstream={stream}'
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
         settings: '{snmp4sdn-settings}'
         global-settings: '{odl-global-settings}'
+        post-step-run-condition: UNSTABLE
 
     postbuilders:
-        - jacoco-nojava-workaround
+        - conditional-step:
+            condition-kind: file-exists
+            condition-filename: deploy-site.xml
+            condition-basedir: workspace
+
+            # The strategy here is intentional to run Maven site:deploy twice
+            # once using regular pom.xml to produce a staged-site which is
+            # then used by deploy-site.xml to push to Nexus. This is a
+            # workaround to Maven Site's default linking code which creates
+            # incorrect URLs for sites due to auto-detection assuming your
+            # project is configured in a certain way which ODL is not.
+            steps:
+            - maven-target:
+                maven-version: '{mvn33}'
+                pom: pom.xml
+                goals: 'site:deploy -Dstream={stream}'
+                java-opts:
+                    - '-Xmx2g'
+                settings: '{snmp4sdn-settings}'
+                global-settings: '{odl-global-settings}'
+            - maven-target:
+                maven-version: '{mvn33}'
+                pom: deploy-site.xml
+                goals: 'site:deploy -Dstream={stream}'
+                java-opts:
+                    - '-Xmx2g'
+                settings: '{snmp4sdn-settings}'
+                global-settings: '{odl-global-settings}'
 
     reporters:
         - findbugs
     # builder and pushes to Sonar analysis.
     #
     # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable-helium)
-    #     branch:    branch (eg. stable/helium)
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
 
     project-type: maven
     node: dynamic_verify
 
     prebuilders:
         - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
 
     maven:
-        maven-name: '{mvn32}'
+        maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  source:jar javadoc:jar'
+        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r '
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
         settings: '{snmp4sdn-settings}'
         global-settings: '{odl-global-settings}'
 
-    postbuilders:
-        - jacoco-nojava-workaround
-
     reporters:
         - findbugs
 
 - job-template:
     name: 'snmp4sdn-distribution-{stream}'
 
+    # Required variables:
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
+
     project-type: maven
     node: dynamic_merge
     jdk: '{jdk}'
 
     prebuilders:
         - wipe-org-opendaylight-repo
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
 
     maven:
-        maven-name: '{mvn32}'
+        maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: '-Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r clean install source:jar javadoc:jar'
+        goals: '-Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r clean install'
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
         settings: '{integration-settings}'
         global-settings: '{odl-global-settings}'
     # is successfully built.
     #
     # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable-helium)
-    #     branch:    branch (eg. stable/helium)
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
 
     project-type: maven
     node: dynamic_merge
 
     prebuilders:
         - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
 
     maven:
-        maven-name: '{mvn32}'
+        maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  source:jar javadoc:jar'
+        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r '
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
         settings: '{snmp4sdn-settings}'
         global-settings: '{odl-global-settings}'
 
-    postbuilders:
-        - jacoco-nojava-workaround
-
     reporters:
         - findbugs
 
 
     triggers:
         - timed: 'H H * * *'
+        - gerrit-trigger-patch-sonar:
+            name: 'snmp4sdn'
+
+    prebuilders:
+        - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
 
     maven:
-        maven-name: '{mvn32}'
+        maven-name: '{mvn33}'
         root-pom: 'pom.xml'
         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dsonar'
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
         settings: '{snmp4sdn-settings}'
         global-settings: '{odl-global-settings}'
 
-    postbuilders:
-        - jacoco-nojava-workaround
-
     reporters:
         - findbugs
 
         - jacoco-report
 
 - job-template:
-    name: 'snmp4sdn-clm'
+    name: 'snmp4sdn-clm-{stream}'
 
     project-type: maven
     node: dynamic_verify
-    jdk: 'openjdk7'
+    jdk: '{jdk}'
 
     logrotate:
         daysToKeep: '{build-days-to-keep}'
         - git-scm:
             credentials-id: '{ssh-credentials}'
             refspec: ''
-            branch: 'master'
+            branch: '{branch}'
 
     wrappers:
         - build-timeout
 
     prebuilders:
         - wipe-org-opendaylight-repo
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{snmp4sdn-settings}'
 
     maven:
-        maven-name: '{mvn32}'
+        maven-name: '{mvn33}'
         root-pom: 'pom.xml'
         goals: 'com.sonatype.clm:clm-maven-plugin:index -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
         maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'