Moving CI logic for after_success and after_failure into the build script.