Bug 1018643 - [deploy]Build lifecycle does not check the exit status after pre_build hook
Summary: [deploy]Build lifecycle does not check the exit status after pre_build hook
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Andy Goldstein
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-14 03:45 UTC by Zhe Wang
Modified: 2015-05-14 23:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:23:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zhe Wang 2013-10-14 03:45:58 UTC
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:

PHP-5.3

Version-Release number of selected component (if applicable):
devenv_3893

How reproducible:
always

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 05:55:00 UTC
Other cartridges affected:

Zend
Python-2.6
Perl-5.10

Comment 2 Andy Goldstein 2013-10-18 16:01:26 UTC
https://github.com/openshift/origin-server/pull/3926

Comment 3 Zhe Wang 2013-10-21 03:44:09 UTC
Verified in devenv_3921


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