Red Hat Bugzilla – Bug 1018643
[deploy]Build lifecycle does not check the exit status after pre_build hook
Last modified: 2015-05-14 19:30:05 EDT
Description of problem:
When triggering a Jenkins build of a given app, the build lifecycle does not check the exit status after pre_build hook, as a consequence, even the pre_build hook fails, the build process will still continue. Currently, the following cartridges are covered, and the list will be appended in comments, if there are others:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create an app with jenkins-client embedded
2. create a pre_build hook with the following code:
echo "----Pre_Build Fail Test----"
3. push the change and trigger a Jenkins build
4. check the Jenkins build log
5. add a deploy or post_deploy hook, and repeat Step 2 ~ 5
The jenkins build in Step 3 succeeded. Moreover, when checking the build log, we can see the string "----Pre_Build Fail Test----", but the Jenkins build was not blocked due to the non-zeor exit code.
On the other hand, the build process was blocked when the exit code after deploy or post_deploy hook was non-zero.
The build lifecycle should check the exit status of each action hook which is at presence.
Other cartridges affected:
Verified in devenv_3921