fix(ci): Image names with underscores in search queries
GitHub updated their Ubuntu 22.04 runner image to 20220821.1, which bumped Compose from v2.6.1 to v2.9.0. Compose v2.8.0 introduced a breaking change where the name of certain resources — such as images — are created with hyphens '-' instead of underscores '_'. Ref. https://docs.docker.com/compose/release-notes/#280
This commit is contained in:
parent
fff0c8fc98
commit
52df39e3cc
|
@ -28,7 +28,7 @@ poll_ready "$cid_lsp" "http://${ip_lsp}/health"
|
|||
# 2021/01/07 16:14:52 # logspout v3.2.13-custom by gliderlabs
|
||||
#
|
||||
# which we expect to find by querying:
|
||||
# docker.image:"docker-elk_logspout" AND message:"logspout gliderlabs"~3
|
||||
# docker.image:"docker-elk-logspout" AND message:"logspout gliderlabs"~3
|
||||
#
|
||||
log 'Searching a log entry forwarded by Logspout'
|
||||
|
||||
|
@ -39,7 +39,7 @@ declare -i was_retried=0
|
|||
|
||||
# retry for max 60s (30*2s)
|
||||
for _ in $(seq 1 30); do
|
||||
response="$(curl "http://${ip_es}:9200/logs-generic-default/_search?q=docker.image:%22docker-elk_logspout%22%20AND%20message:%22logspout%20gliderlabs%22~3&pretty" -s -u elastic:testpasswd)"
|
||||
response="$(curl "http://${ip_es}:9200/logs-generic-default/_search?q=docker.image:%22docker-elk-logspout%22%20AND%20message:%22logspout%20gliderlabs%22~3&pretty" -s -u elastic:testpasswd)"
|
||||
|
||||
set +u # prevent "unbound variable" if assigned value is not an integer
|
||||
count="$(jq -rn --argjson data "${response}" '$data.hits.total.value')"
|
||||
|
|
Loading…
Reference in New Issue