Bug 1018643 - [deploy]Build lifecycle does not check the exit status after pre_build hook
[deploy]Build lifecycle does not check the exit status after pre_build hook
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Andy Goldstein
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-10-13 23:45 EDT by Zhe Wang
Modified: 2015-05-14 19:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-23 22:23:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zhe Wang 2013-10-13 23:45:58 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):

How reproducible:

Steps to Reproduce:
1. create an app with jenkins-client embedded

2. create a pre_build hook with the following code:
#! /bin/bash
echo "----Pre_Build Fail Test----"
exit 1

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

Actual results:
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.

Expected results:
The build lifecycle should check the exit status of each action hook which is at presence.

Additional info:
Comment 1 Zhe Wang 2013-10-14 01:55:00 EDT
Other cartridges affected:

Comment 2 Andy Goldstein 2013-10-18 12:01:26 EDT
Comment 3 Zhe Wang 2013-10-20 23:44:09 EDT
Verified in devenv_3921

Note You need to log in before you can comment on or make changes to this bug.