Fix integration-test downstream trigger in autorelease 75/46975/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 15 Oct 2016 00:28:09 +0000 (20:28 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 15 Oct 2016 00:33:58 +0000 (20:33 -0400)
Autorelease-release-{stream} jobs were not triggering downstream
integration-test triggers. This was due to the introduction of
opendaylight-infra-ship logs which moves files for archiving out of the
$WORKSPACE and into the archives directory for shipping to
logs.opendaylight.org. While this is normally fine, Parameterized build
triggers actually are designed to run as a final step in a build rather
than earlier so we need to ensure the input file is still around at the
end of the build.

The solution presented here copies the autorelease variables.prop to a
new variables.jenkins-trigger. One copy is for archiving while the other
copy is for triggering the final build.

Change-Id: Idcf419378fd8f60fab653350be856d60f7ba19aa
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/autorelease/autorelease-templates.yaml
jjb/autorelease/include-raw-autorelease-get-integration-test-variables.sh
jjb/releng-macros.yaml

index 26b6d97920572154b20ab33da9f8d9d9f39d992d..58cd51e1be613e21e37f3d3ce321646196b28147 100644 (file)
@@ -89,7 +89,7 @@
         - trigger-parameterized-builds:
             - project: 'integration-distribution-test-{integration-test}'
               condition: UNSTABLE_OR_BETTER
-              property-file: variables.prop
+              property-file: variables.jenkins-trigger
               fail-on-missing: true
         - opendaylight-infra-shiplogs:
             maven-version: 'mvn33'
index 67564700cf77eeec6a7fd50a0261afd994852da7..29b0cf5d7614a79761816fa7a4290904cbe43993 100644 (file)
@@ -15,3 +15,9 @@ echo "VERSION: ${VERSION}"
 REPOID=`grep "Created staging repository with ID" $WORKSPACE/deploy-staged-repository.log | cut -d '"' -f2`
 echo BUNDLEURL=${NEXUSURL}/${REPOID}/org/opendaylight/integration/distribution-karaf/${VERSION}/distribution-karaf-${VERSION}.zip > $WORKSPACE/variables.prop
 echo "BUNDLEURL: ${BUNDLEURL}"
+
+# Copy variables.prop to variables.jenkins-trigger so that the end of build
+# trigger can pick up the file as input for triggering downstream jobs.
+# This allows variables.prop to get archive to logs.opendaylight.org while not
+# breaking the downstream trigger due to missing file from archiving.
+cp variables.prop variables.jenkins-trigger
index 80464d1c294cff3b00e0ebf16f4f497c5c202a2f..479c73d11179778a817eac7ab9017876274e0892 100644 (file)
             mark-unstable-if-failed: True
         - workspace-cleanup:
             exclude:
-              # autorelease-release-{stream} reqires vaiables.prop file to be preserved
-              # as the downstream test jobs fails invoke without automatically
-              - variables.prop
+              # Do not clean up *.jenkins-trigger files for jobs that use a
+              # properties file as input for triggering another build.
+              - '**/*.jenkins-trigger'
             fail-build: false
 
 - builder: