]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
jjb: be verbose and fail early on errors 21/head
authorKen Dreyer <kdreyer@redhat.com>
Fri, 14 Nov 2014 14:27:53 +0000 (07:27 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Fri, 14 Nov 2014 14:27:53 +0000 (07:27 -0700)
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

index 839a3d51a1c20b62a8a3d9e0bbd86f42bd1edb25..dd46f68f603d8f97e57b088aa95ac642f6a071c1 100644 (file)
@@ -6,6 +6,8 @@
 # definitions.
 #
 
+set -ex
+
 # Create the virtualenv
 virtualenv venv
 . venv/bin/activate