Description of problem: Given a PHP-5.3 app, it does not execute the build hook during its build cycle, but it does execute pre_build, deploy and post_deploy hook. Version-Release number of selected component (if applicable): devenv_3893 How reproducible: always Steps to Reproduce: 1. create a php-5.3 app 2. create a build hook with the following code, and make it executable #! /bin/bash echo "----Build Fail Test----" touch /var/lib/openshift/:app_uuid/app-root/runtime/repo/build_test exit 1 3. push the change and trigger a build Actual results: The build succeeded, but neither the expected string was printed in stdout during interactive activation nor the build_test file was created. Expected results: The build hook should be executed. Additional info:
There are a few things here: The echo not being displayed was fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1016977 If you want to create a file inside the repo in a hook, you must now use $OPENSHIFT_REPO_DIR, as ~/app-root/runtime/repo may not be valid at build time now. The fact that the build succeeds when the build hook has a non-zero exit is a problem and I am working to fix it.
https://github.com/openshift/origin-server/pull/3926
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/18c041bcde6794c04088cd3df36083669a72e2e8 Bug 1018665 Reraise the ShellExecutionException in build() so it's seen as a failure and halts the deployment
Verified in devenv_3921 After creating a build hook with the following code: #! /bin/bash echo "----Build Fail Test----" exit 1 the build process was aborted: Building PHP cartridge ----Build Fail Test---- An error occurred executing 'gear build' (exit code: 1) Error message: Failed to execute action hook 'build' for 5264a201ab3b098bc2000359 application phptstbldr