Generate versions.csv for autorelease builds
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
index 7cdc433707b82611fb20d98a59cf7e7358c7e74b..0dd622129420065c80f73dea0a25f4d648bbcbda 100644 (file)
@@ -9,6 +9,7 @@
     cron: 'H 0 * * *'
 
     # Default variable values
+    mvn-version: mvn33
     extra-mvn-opts: ''
 
     properties:
 
     builders:
       # force jenkins install of maven version before any shell scripts use it
-      - maven-target:
-          maven-version: 'mvn33'
-          goals: '-version'
-          settings: 'autorelease-settings'
-          settings-type: cfp
-          global-settings: 'global-settings'
-          global-settings-type: cfp
+      - lf-maven-install:
+          mvn-version: '{mvn-version}'
       - wipe-local-maven-repo
       - jacoco-nojava-workaround
       - shell: "./scripts/list-project-dependencies.sh"
       - autorelease-cfp:
           autorelease-settings: 'autorelease-settings'
           global-settings: 'odl-global-settings'
-      - autorelease-generate-taglist
+      - autorelease-generate-release-patches
+      - autorelease-generate-artifact-versions
       - autorelease-distribute-taglist
       - distribute-build-url:
           path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
-      - autorelease-generate-release-patches
       # In a perfect world projects should be releasing separately and we consume them
       # via a project that pulls the release bits from each project from Nexus.
       # Keep the patches compatible with that ideal, but apply an edit
 
     publishers:
       - lf-infra-publish
+
+- job-template:
+    name: '{project-name}-validate-autorelease-{stream}'
+    disabled: false
+
+    project-type: freestyle
+    node: '{build-node}'
+    concurrent: true
+    jdk: openjdk8
+
+    properties:
+      - lf-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          stream: '{stream}'
+          branch: '{branch}'
+      - autorelease-release-tag:
+          release-tag: validate
+      - string:
+          name: CLONE_URL
+          default: '{git-url}/releng/autorelease'
+          description: "Autorelease clone URL"
+
+    scm:
+      - git:
+          url: '$CLONE_URL'
+          credentials-id: 'opendaylight-jenkins-ssh'
+          refspec: ''
+          branches:
+            - 'origin/{branch}'
+          skip-tag: true
+          submodule:
+            recursive: true
+            timeout: 60
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    triggers:
+      - gerrit-trigger-patch-submitted:
+          server: '{server-name}'
+          project: '{project}'
+          branch: '{branch}'
+          files: '**/*.xml'
+
+    builders:
+      - jacoco-nojava-workaround
+      - autorelease-checkout-gerrit-patch
+      - autorelease-generate-release-patches
+      # In a perfect world projects should be releasing separately and we consume them
+      # via a project that pulls the release bits from each project from Nexus.
+      # Keep the patches compatible with that ideal, but apply an edit
+      # to enable building in a single maven reactor afterwards.
+      - autorelease-fix-relative-paths
+      - maven-target:
+          maven-version: mvn33
+          pom: validate-pom.xml
+          goals: |
+              clean install dependency:tree
+              -T1.5C
+              -Pq
+              {opendaylight-infra-mvn-opts}
+          java-opts:
+            - '-Xmx8g'
+          settings: autorelease-settings
+          settings-type: cfp
+          global-settings: global-settings
+          global-settings-type: cfp
+      - maven-target:
+          maven-version: mvn33
+          pom: pom.xml
+          goals: |
+              clean validate
+              -Pq
+              {opendaylight-infra-mvn-opts}
+          java-opts:
+            - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+          settings: autorelease-settings
+          settings-type: cfp
+          global-settings: global-settings
+          global-settings-type: cfp
+
+    publishers:
+      - email-notification:
+          email-recipients: '{email-recipients}'
+          email-prefix: '[autorelease] [{project-name}]'
+      - lf-infra-publish