Skip to content
Snippets Groups Projects
Commit d4cdd5b4 authored by Calen Pennington's avatar Calen Pennington
Browse files

Make jenkins talk to the github status api

parent 61c17cab
No related merge requests found
function github_status {
gcli status create mitx mitx $GIT_COMMIT \
--params=$1 \
target_url:$BUILD_URL \
description:"Build #$BUILD_NUMBER is running" \
-f csv
}
function github_mark_failed_on_exit {
trap '[ $? == "0" ] || github_status state:failed' EXIT
}
\ No newline at end of file
......@@ -3,6 +3,9 @@
set -e
set -x
github_mark_failed_on_exit
github_status state:pending
# Reset the submodule, in case it changed
git submodule foreach 'git reset --hard HEAD'
......@@ -26,4 +29,6 @@ rake phantomjs_jasmine_cms || true
rake coverage:xml coverage:html
[ $TESTS_FAILED == '0' ]
rake autodeploy_properties
\ No newline at end of file
rake autodeploy_properties
github_status state:success
......@@ -3,6 +3,12 @@
set -e
set -x
. base.sh
github_mark_failed_on_exit
github_status state:pending
# Reset the submodule, in case it changed
git submodule foreach 'git reset --hard HEAD'
......@@ -24,4 +30,6 @@ rake phantomjs_jasmine_lms || true
rake coverage:xml coverage:html
[ $TESTS_FAILED == '0' ]
rake autodeploy_properties
\ No newline at end of file
rake autodeploy_properties
github_status state:success
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment