This change fixes the following issues:
1) 'nounset' will cause the script to fail when activating a virtualenv
since the activation of a virtualenv unsets variables
2) There are not artifacts available from releng-merge-jjb and copying
them would save minimal time over re-running jjb
Change-Id: Ifc4297947c8fe235987a507ead932841480165a7
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
##############################################################################
set -o errexit
-set -o nounset
set -o pipefail
# Job Number Formatter
fi
}
-# We expect job_output to exist prior to this being run and contain the
-# output from jenkins-jobs test
+# Activiate the virtualenv so we have access to 'jenkins-jobs'
+source /opt/virtualenv/jenkins-job-builder/bin/activate
+
+echo "> Generating list of current JJB jobs..."
+jenkins-jobs -l ERROR test -r jjb -o job_output
echo "> Generating list of previous JJB jobs..."
git checkout -q -b previous-commit HEAD^
files: 'jjb/**'
builders:
- - copyartifact:
- project: releng-merge-jjb
- filter: "job_output/*"
- which-build: last-successful
- stable: true
- optional: false
- flatten: false
- do-not-fingerprint: true
- shell:
!include-raw-escape: generate-job-list.sh
- report-build-result-to-gerrit