ci: parse smoke response as json
This commit is contained in:
@@ -181,7 +181,11 @@ pipeline {
|
|||||||
$DOCKER_CMD logs "$SMOKE_APP" >&2
|
$DOCKER_CMD logs "$SMOKE_APP" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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/" \
|
curl --fail --silent --show-error "http://127.0.0.1:$host_port/" \
|
||||||
| grep -Fq '<div id="app"></div>'
|
| grep -Fq '<div id="app"></div>'
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user