From: Trevor Bramwell Date: Fri, 8 Sep 2017 19:59:38 +0000 (-0700) Subject: Fix Expermental JJB Job Diff Commenting X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=7b9736eba9b56ffba4bdb302ba6767f68de6df2f;p=releng.git Fix Expermental JJB Job Diff Commenting 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 --- diff --git a/jjb/releng/generate-job-list.sh b/jjb/releng/generate-job-list.sh index 0e35eaad4..583cbb126 100755 --- a/jjb/releng/generate-job-list.sh +++ b/jjb/releng/generate-job-list.sh @@ -9,7 +9,6 @@ ############################################################################## set -o errexit -set -o nounset set -o pipefail # Job Number Formatter @@ -22,8 +21,11 @@ function JOBS { 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^ diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index 42d88fb7a..fd58ef2b8 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -72,14 +72,6 @@ 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