From 2b9f0c9e14c58848bd87418a48fca00bedb99d23 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Fri, 17 Jan 2014 11:51:44 -0700 Subject: [PATCH] updated jenkins script to work for specific release versions --- scripts/ci.sh | 14 ++------------ scripts/jenkins.sh | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/scripts/ci.sh b/scripts/ci.sh index cb39fe4f0..0804903d1 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -4,13 +4,11 @@ # Run the tests, and setup es if needed # # ENV VARS: -# TRAVIS - Identifies that we're running on travis-ci -# ES_V - version identifier set by Jenkins # ES_BRANCH - the ES branch we should use to generate the tests and download es -# ES_VERSION - a specific ES version to download in use for testing +# ES_RELEASE - a specific ES release to download in use for testing # NODE_UNIT=1 - 0/1 run the unit tests in node # NODE_INTEGRATION=1 - 0/1 run the integration tests in node -# TEST_BROWSER - the browser to run using selemium '{{name}}:{{version}}:{{OS}}' +# TEST_BROWSER - the browser to test in using, sauce labs. One of 'ie', 'firefox', 'chrome' # COVERAGE - 0/1 check for coverage and ship it to coveralls # ########### @@ -44,14 +42,6 @@ function grunt_ { # normalize ES_BRANCH into TESTING_BRANCH if [[ -n "$ES_BRANCH" ]]; then TESTING_BRANCH=$ES_BRANCH -elif [[ -n "$ES_V" ]]; then - re='^(.*)_nightly$'; - if [[ $ES_V =~ $re ]]; then - TESTING_BRANCH=${BASH_REMATCH[1]} - else - echo "unable to parse ES_V $ES_V" - exit 1 - fi else TESTING_BRANCH="master" fi diff --git a/scripts/jenkins.sh b/scripts/jenkins.sh index eb89e0667..2d0eeb535 100755 --- a/scripts/jenkins.sh +++ b/scripts/jenkins.sh @@ -5,4 +5,26 @@ export JENKINS="true" HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" set +x + +if [[ -z "$ES_V" ]]; then + echo "you must set the ES_V environment variable to use this script" + exit 1 +fi + +re_nightly='^(.*)_nightly$'; +re_090='^0\.90\..*$'; +re_10='^1\.0\..*$'; +if [[ "$ES_V" =~ $re_nightly ]]; then + export ES_BRANCH=${BASH_REMATCH[1]} +elif [[ "$ES_V" =~ $re_090 ]]; then + ES_BRANCH='0.90' + ES_RELEASE=$ES_V +elif [[ "$ES_V" =~ $re_10 ]]; then + ES_BRANCH='1.0' + ES_RELEASE=$ES_V +else + echo "unable to parse ES_V $ES_V" + exit 1 +fi + source $HERE/ci.sh \ No newline at end of file