diff options
author | 2017-04-19 10:51:47 +0200 | |
---|---|---|
committer | 2017-04-19 15:37:23 +0200 | |
commit | 8299d98d5f03d506c767bf669566967b8b74a14d (patch) | |
tree | ef2c1a6c6b4549aecd1e3c25ef6d66972947abf6 /jjb/csit/include-raw-csit-vpp-perf-ndrchk-daily.sh | |
parent | 557e71c5e7e82d8ececfed7f84da56608af6c756 (diff) |
CSIT-531: Performance jobs reorganization, part 1
Add:
- csit-vpp-perf-trend-daily
- csit-vpp-perf-trend-semiweekly
- csit-vpp-perf-check
- csit-vpp-perf-ndrchk-daily
Change-Id: Ie7ab8a754e7fed2efdd5496c44a4fde454711d1c
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'jjb/csit/include-raw-csit-vpp-perf-ndrchk-daily.sh')
-rw-r--r-- | jjb/csit/include-raw-csit-vpp-perf-ndrchk-daily.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/jjb/csit/include-raw-csit-vpp-perf-ndrchk-daily.sh b/jjb/csit/include-raw-csit-vpp-perf-ndrchk-daily.sh new file mode 100644 index 000000000..a4aead5ca --- /dev/null +++ b/jjb/csit/include-raw-csit-vpp-perf-ndrchk-daily.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -xeu -o pipefail + +# check BRANCH_ID value +if [ "$BRANCH_ID" == "" ]; then + echo "branch_id not provided => 'master' will be used" + BRANCH_ID="master" +fi + +# make sure there is no csit directory +if [ -d "./csit/" ]; then + rm -rf ./csit/ +fi + +# clone csit +git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit + +# if the git clone fails, complain clearly and exit +if [ $? != 0 ]; then + echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit" + exit 1 +fi + +cd csit + +# get the latest verified version of the required branch +BRANCH_NAME=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1)) + +if [ "${BRANCH_NAME}" == "" ]; then + echo "No verified version found for requested branch - exiting" + exit 1 +fi + +# remove 'origin/' from the branch name +BRANCH_NAME=$(echo ${BRANCH_NAME#origin/}) + +# checkout to the required branch +git checkout ${BRANCH_NAME} + +export TEST_TAG="PERFTEST_NDRCHK_DAILY" + +# execute csit bootstrap script if it exists +if [ -e bootstrap-verify-perf.sh ] +then + # make sure that bootstrap.sh is executable + chmod +x bootstrap-verify-perf.sh + # run the script + ./bootstrap-verify-perf.sh +else + echo 'ERROR: No bootstrap-verify-perf.sh found' + exit 1 +fi + +# vim: ts=4 ts=4 sts=4 et : |