ci: parse smoke response as json
This commit is contained in:
@@ -181,7 +181,11 @@ pipeline {
|
||||
$DOCKER_CMD logs "$SMOKE_APP" >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -Fq "\"version\":\"$IMMUTABLE_TAG\"" artifacts/smoke-ping.json
|
||||
python3 - "$IMMUTABLE_TAG" <<'PY'
|
||||
import json, pathlib, sys
|
||||
payload = json.loads(pathlib.Path('artifacts/smoke-ping.json').read_text(encoding='utf-8'))
|
||||
assert payload.get('version') == sys.argv[1], payload
|
||||
PY
|
||||
curl --fail --silent --show-error "http://127.0.0.1:$host_port/" \
|
||||
| grep -Fq '<div id="app"></div>'
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user