Skip to content

Commit 6a0e094

Browse files
committed
feat(nightwatch): upload test output to GCS instead of trying to log to stdout [ZO-5537]
1 parent cc62f1e commit 6a0e094

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

components/nightwatch/deployment.yaml

+17-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,21 @@ data:
77
run.sh: |
88
while true
99
do
10-
$@
10+
folder=nightwatch-zeit-de/$NIGHTWATCH_NAMESPACE/$NIGHTWATCH_ENVIRONMENT
11+
timestamp=$(date +%Y/%m/%d/%H-%M)
12+
echo "Nightwatch run $folder/$timestamp"
13+
rm -f report.xml report.html
14+
15+
if ! $@ --junitxml=report.xml then
16+
failure=1
17+
fi
18+
19+
pipenv run junit2html report.xml report.html
20+
pipenv run gcs-upload report.html gs://$folder/$timestamp.html
21+
if [[ $failure == 1 ]]; then
22+
pipenv run gcs-upload report.html gs://$folder/lastfailed.html
23+
fi
24+
1125
sleep 4m
1226
done
1327
@@ -39,10 +53,10 @@ spec:
3953
- "run"
4054
- "pytest"
4155
- "--tb=native"
42-
- "--verbose"
56+
- "--quiet"
57+
- "--show-capture=no"
4358
- "--prometheus"
4459
- "--prometheus-pushgateway-url=http://pushgateway.cluster-infra.svc.cluster.local:9091/"
45-
- "--json-report=-"
4660
args:
4761
- "--nightwatch-environment=$NIGHTWATCH_ENVIRONMENT"
4862
volumeMounts:

0 commit comments

Comments
 (0)