Skip to content

Commit

Permalink
Merge pull request #413 from alphagov/build_branches
Browse files Browse the repository at this point in the history
Configure branch builds
  • Loading branch information
GrouchPotato committed Jun 2, 2014
2 parents 7f67645 + ec19b88 commit e6d3c77
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions jenkins_branches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -e

VENV_PATH="${HOME}/venv/${JOB_NAME}"

[ -x ${VENV_PATH}/bin/pip ] || virtualenv ${VENV_PATH}
. ${VENV_PATH}/bin/activate

pip install -q ghtools

REPO="alphagov/static"
gh-status "$REPO" "$GIT_COMMIT" pending -d "\"Build #${BUILD_NUMBER} is running on Jenkins\"" -u "$BUILD_URL" >/dev/null

if ./jenkins.sh; then
gh-status "$REPO" "$GIT_COMMIT" success -d "\"Build #${BUILD_NUMBER} succeeded on Jenkins\"" -u "$BUILD_URL" >/dev/null
exit 0
else
gh-status "$REPO" "$GIT_COMMIT" failure -d "\"Build #${BUILD_NUMBER} failed on Jenkins\"" -u "$BUILD_URL" >/dev/null
exit 1
fi

0 comments on commit e6d3c77

Please sign in to comment.