From bcb21eca8961d905ef19fe2ef11b66fb93024874 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Fri, 14 Nov 2014 07:27:53 -0700 Subject: [PATCH] jjb: be verbose and fail early on errors Prior to this commit, if the "job-builder update" command failed, Jenkins would still consider the overall job to have succeeded, because the jjb/config/config script was exiting with a zero exit code. (This was because the for/ls loop were the final commands to run, and they were exiting with zero.) When I modified the Jenkins UID as a part of the overall Jenkins authentication changes yesterday, the "job-builder update" command no longer worked, because the password in jenkins_builder.ini was no longer valid. However, Jenkins still considered the jjb job to be passing, as explained above. Tell bash to be verbose about the commands it runs ("set -x") and fail early if there are any problems ("set -e"). With this change, if there is a problem with "job-builder update" or any other command in the script, the job will fail right away and Jenkins will bring it to our attention sooner. --- jjb/config/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jjb/config/config b/jjb/config/config index 839a3d51..dd46f68f 100644 --- a/jjb/config/config +++ b/jjb/config/config @@ -6,6 +6,8 @@ # definitions. # +set -ex + # Create the virtualenv virtualenv venv . venv/bin/activate -- 2.47.3