forked from cloudfoundry/cf-deployment-concourse-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask
executable file
·60 lines (46 loc) · 1.67 KB
/
task
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -xeu
build_dir=${PWD}
if [[ -d "${build_dir}/cf-cli" ]]; then
echo "Setting PATH so that input cf-cli is found by CATs..."
PATH="${build_dir}/cf-cli:${PATH}"
export PATH
fi
export CONFIG
CONFIG=$(mktemp)
original_config="${build_dir}/integration-config/${CONFIG_FILE_PATH}"
reporter_config="${build_dir}/integration-config/${REPORTER_CONFIG_FILE_PATH}"
if ${CAPTURE_LOGS}; then
jq ".artifacts_directory=\"${build_dir}/cats-trace-output\"" ${original_config} > ${CONFIG}
else
cp ${original_config} ${CONFIG}
fi
if [ -f ${reporter_config} ]; then
echo "Configuring Honeycomb integration..."
set +x
reporter_config_value="$(cat ${reporter_config})"
combined_config_value="$(cat ${CONFIG} | jq --argjson reporter "$reporter_config_value" '. + $reporter')"
pushd "${build_dir}/cf-acceptance-tests"
combined_config_value="$(echo ${combined_config_value} | jq ".reporter_config.custom_tags.cats_git_sha=\"$(git rev-parse HEAD)\"" )"
combined_config_value="$(echo ${combined_config_value} | jq ".reporter_config.custom_tags.cf_cli_version=\"$(cf -v | awk '{print $3}')\"" )"
popd
echo "$combined_config_value" > ${CONFIG}
set -x
fi
CF_GOPATH=/go/src/github.com/cloudfoundry/
echo "Moving cf-acceptance-tests onto the gopath..."
mkdir -p $CF_GOPATH
cp -R cf-acceptance-tests $CF_GOPATH
cd /go/src/github.com/cloudfoundry/cf-acceptance-tests
export CF_DIAL_TIMEOUT=11
export CF_PLUGIN_HOME=$HOME
./bin/test \
--keep-going \
--randomize-all \
--skip-package=helpers \
--slow-spec-threshold="${SLOW_SPEC_THRESHOLD}" \
--nodes="${NODES}" \
--skip="${SKIP_REGEXP}" \
--flake-attempts=${FLAKE_ATTEMPTS} \
--timeout="${TIMEOUT}" \
--no-color