.jenkins.sh 772 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# Copyright ETSI 2018
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt

#set -vx
#set -e

cd "$(dirname "$0")"

run_dir="$(pwd)"

12
13
echo "Using git branch $GIT_BRANCH"

Michele Carignani's avatar
Michele Carignani committed
14
bash ./scripts/build-container.sh
15
bash ./scripts/run-container.sh "${run_dir}" "$GIT_BRANCH"
16

17
18
19
20
21
22
23
24
25
26
27
28
29
if [[ "$GIT_BRANCH" =~ .*fix-plu$ ]]; then

	apiTestsVersion=$(echo $GIT_BRANCH | cut -d'/' -f 2)
	apiTestsVersion=$(echo $apiTestsVersion | cut -d'-' -f 1)
	echo apiTestsVersion
	
	curl -X POST \
     -F token=${ROBOT_HIVE_TAP_TT_TOKEN} \
     -F ref=master \
     -F "variables[API_TESTS_VERSION]=$apiTestsVersion" \
     -F "variables[TEST_SUITE]=NFV" \
     https://forge.etsi.org/rep/api/v4/projects/484/trigger/pipeline
fi
Michele Carignani's avatar
bugfix  
Michele Carignani committed
30
31
32
ret=$?
echo "Final validation result: $ret"
exit $ret