From b3e8d5976221eca470ba82b7d6ca510e6a754269 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 13 May 2013 16:12:18 -0400 Subject: [PATCH] Make gcli commands flexible around org and repo name --- jenkins/base.sh | 25 ------------------------- jenkins/test.sh | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 jenkins/base.sh diff --git a/jenkins/base.sh b/jenkins/base.sh deleted file mode 100644 index 7eb4802b8f..0000000000 --- a/jenkins/base.sh +++ /dev/null @@ -1,25 +0,0 @@ -## -## requires >= 1.3.0 of the Jenkins git plugin -## - -function github_status { - - if [[ ! ${GIT_URL} =~ git@github.com:([^/]+)/([^\.]+).git ]]; then - echo "Cannot parse Github org or repo from URL, using defaults." - ORG="edx" - REPO="mitx" - else - ORG=${BASH_REMATCH[1]} - REPO=${BASH_REMATCH[2]} - fi - - gcli status create $ORG $REPO $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 -} diff --git a/jenkins/test.sh b/jenkins/test.sh index a90cc8e806..0dc16cb482 100755 --- a/jenkins/test.sh +++ b/jenkins/test.sh @@ -3,8 +3,21 @@ set -e set -x +## +## requires >= 1.3.0 of the Jenkins git plugin +## + function github_status { - gcli status create edx edx-platform $GIT_COMMIT \ + if [[ ! ${GIT_URL} =~ git@github.com:([^/]+)/([^\.]+).git ]]; then + echo "Cannot parse Github org or repo from URL, using defaults." + ORG="edx" + REPO="edx-platform" + else + ORG=${BASH_REMATCH[1]} + REPO=${BASH_REMATCH[2]} + fi + + gcli status create $ORG $REPO $GIT_COMMIT \ --params=$1 \ target_url:$BUILD_URL \ description:"Build #$BUILD_NUMBER $2" \