Change autorelease jobs to timeout after 15h
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
index 992c1008f1d1046ac6edd17583efb270630c3dd1..284fdef09c0635d96479e9cabca753b4b42bd26c 100644 (file)
@@ -8,6 +8,9 @@
     jdk: '{jdk}'
     cron: 'H 0 * * *'
 
+    # Default variable values
+    extra-mvn-opts: ''
+
     properties:
       - opendaylight-infra-properties:
           build-days-to-keep: '30'
           release-tag: '{next-release-tag}'
       - autorelease-release-branch:
           release-branch: '{branch}'
+      - string:
+          name: EXTRA_MVN_OPTS
+          default: '{extra-mvn-opts}'
+          description: |
+              Additional optional Maven Options to pass to the Maven Goals
+              parameter.
+
+              Examples:
+              -Dskip.karaf.featureTest=true  # To disable karaf SingleFeatureTests
+              --fail-never   # NEVER fail the build, regardless of project result
+              --fail-at-end  # Only fail the build afterwards; allow all non-impacted builds to continue
 
     scm:
       - git:
@@ -43,7 +57,7 @@
 
     wrappers:
       - opendaylight-infra-wrappers:
-          build-timeout: '1440'
+          build-timeout: '900'
 
     triggers:
       - timed: '{cron}'
@@ -79,6 +93,7 @@
           pom: 'pom.xml'
           goals: |
               clean deploy
+              $EXTRA_MVN_OPTS
               -Pintegrationtests,docs,repoBuild
               -Dcheckstyle.skip=true
               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
           settings: 'autorelease-settings'
           global-settings: 'odl-global-settings'
       - autorelease-maven-sources-post-process
-      - autorelease-sys-stats
       - shell: |
           mkdir -p archives/
           cp *.log *.prop $_
 
     publishers:
       - opendaylight-infra-notify-status
+      - opendaylight-infra-sysstats
       - archive:
           # Need to archive dependencies.log in Jenkins to provide a simple
           # way for downstream jobs to pull the latest version of this file
           # in their builds.
           artifacts: 'dependencies.log'
       - trigger-parameterized-builds:
+          - project: 'autorelease-generate-release-notes-{stream}'
+            condition: UNSTABLE_OR_BETTER
+            property-file: variables.jenkins-trigger
+            fail-on-missing: true
           - project: 'integration-distribution-test-{integration-test}'
             condition: UNSTABLE_OR_BETTER
             property-file: variables.jenkins-trigger
             fail-on-missing: true
           - project: 'integration-distribution-test-{integration-test}'
             condition: FAILED
+            trigger-with-no-params: true
           - project: 'integration-sanity-test-{integration-test}'
             condition: UNSTABLE_OR_BETTER
             property-file: variables.jenkins-trigger
             fail-on-missing: true
           - project: 'integration-sanity-test-{integration-test}'
             condition: FAILED
+            trigger-with-no-params: true
           - project: 'packaging-build-rpm-master'
             condition: UNSTABLE_OR_BETTER
             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
             fail-on-missing: true
       - opendaylight-infra-shiplogs:
           maven-version: 'mvn33'
+
+
+- job-template:
+    name: 'autorelease-generate-release-notes-{stream}'
+
+    project-type: freestyle
+    node: centos7-java-builder-2c-8g
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - opendaylight-infra-parameters:
+          os-cloud: '{os-cloud}'
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - git:
+          credentials-id: 'opendaylight-jenkins-ssh'
+          url: '$GIT_BASE'
+          refspec: '$GERRIT_REFSPEC'
+          branches:
+            - '$GERRIT_BRANCH'
+          choosing-strategy: 'gerrit'
+          skip-tag: true
+          submodule:
+            recursive: true
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '30'
+
+    triggers:
+      - timed: '0 0 * * 0'
+
+    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: 'odl-global-settings'
+          global-settings-type: cfp
+      - maven-target:
+          maven-version: 'mvn33'
+          pom: '$WORKSPACE/scripts/release_notes_management/pom.xml'
+          goals: |
+              clean package
+              -Dcheckstyle.skip=true
+              -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
+              {opendaylight-infra-mvn-opts}
+          java-opts:
+            - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+          settings: 'autorelease-settings'
+          settings-type: cfp
+          global-settings: 'odl-global-settings'
+          global-settings-type: cfp
+      - autorelease-generate-release-notes
+
+    publishers:
+      - opendaylight-infra-sysstats
+      - opendaylight-infra-shiplogs:
+          maven-version: 'mvn33'