Ensure autorelease pull submodule HEAD of branch
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
index 7e5138f08f15b3032967a02ffc3b32c5ad125e0e..5280e00a3292df4bae64ee20acab2f547f783029 100644 (file)
@@ -87,7 +87,7 @@
       - distribution-karaf-version:
           karaf-version: '{karaf-version}'
       - autorelease-release-tag:
-          release-tag: '{next-release-tag}'
+          release-tag: '{stream}'
       - string:
           name: EXTRA_MVN_OPTS
           default: '{extra-mvn-opts}'
           goals: |
               clean deploy
               $EXTRA_MVN_OPTS
-              -Pintegrationtests,docs,repoBuild
+              -Pintegrationtests,repoBuild
               -Dcheckstyle.skip=true
               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
               {opendaylight-infra-mvn-opts}
           - 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-{stream}'
             condition: UNSTABLE_OR_BETTER
             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
           mark-unstable-if-failed: false
       - lf-infra-publish
 
+- job-template:
+    name: 'autorelease-update-submodules-{stream}'
+
+    ######################
+    # Default parameters #
+    ######################
+
+    cron: 'H 0 * * *'
+
+    #####################
+    # Job configuration #
+    #####################
+
+    project-type: freestyle
+    node: centos7-builder-2c-2g
+
+    properties:
+      - lf-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - lf-infra-parameters:
+          project: releng/autorelease
+          branch: '{branch}'
+          stream: '{stream}'
+          refspec: 'refs/heads/{branch}'
+          lftools-version: '{lftools-version}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '$GIT_URL/$GERRIT_PROJECT'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          jenkins-ssh-credential: opendaylight-jenkins-ssh
+          submodule-recursive: true
+          choosing-strategy: default
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: 10
+          jenkins-ssh-credential: opendaylight-jenkins-ssh
+
+    triggers:
+      - timed: '{obj:cron}'
+
+    builders:
+      # Fetch latest head of branch
+      - shell: |
+          git checkout $GERRIT_BRANCH
+          git submodule update --remote
+          git add .
+      - lf-infra-push-gerrit-patch:
+          project: '{project}'
+          gerrit-user: 'jenkins-$SILO'
+          gerrit-host: 'git.opendaylight.org'
+          gerrit-topic: 'autorelease-update-submodules'
+          gerrit-commit-message: 'Update submodules to latest HEAD of branch'
+          reviewers-email: ''
+
+    publishers:
+      - lf-infra-publish
+
 - job-template:
     name: autorelease-update-validate-jobs-{stream}
 
     builders:
       - autorelease-update-project-views
       - autorelease-update-validate-projects
-      - opendaylight-infra-push-gerrit-patch:
-          project: 'releng/builder'
+      - lf-infra-push-gerrit-patch:
+          project: '{project}'
+          gerrit-user: 'jenkins-$SILO'
+          gerrit-host: 'git.opendaylight.org'
           gerrit-topic: 'autorelease-update-validate-jobs-{stream}'
           gerrit-commit-message: |
-              Update validate autorelease projects for {stream}
+              'Update validate autorelease projects for {stream}'
+          reviewers-email: 'jenkins-releng@opendaylight.org'
 
     publishers:
       - lf-infra-publish
           lftools-version: '{lftools-version}'
       - string:
           name: RELEASE_TAG
-          default: '{next-release-tag}'
+          default: '{stream}'
           description: |
               Release that is being version bumped.
               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
           project: '{project}'
           branch: '{branch}'
           files: '**/*.xml'
+          forbidden-files: ''
 
     builders:
       - autorelease-checkout-gerrit-patch
           settings-type: cfp
           global-settings: global-settings
           global-settings-type: cfp
-      # Hack to workaround the duplicate-finder plugin in odlparent breaking validate-autorelease
-      - shell: sed -i 's/validate/none/' /tmp/r/org/opendaylight/odlparent/odlparent/3.0.2/odlparent-3.0.2.pom || true
       - maven-target:
           maven-version: mvn35
           pom: pom.xml