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>
- 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'
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
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: