Fix parsing of stack_name/service concatenation

This commit is contained in:
decentral1se 2021-03-16 05:04:05 +01:00
parent 524fb6a44c
commit 00c8a988e1
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 1 additions and 1 deletions

2
abra
View File

@ -468,7 +468,7 @@ output_version_summary() {
SERVICES=$(yq e '.services | keys | .[]' "${APP_DIR}/${COMPOSE_FILE}")
for SERVICE in $SERVICES; do
filter="{{index .Spec.Labels \"coop-cloud.$STACK_NAME.$SERVICE.version\" }}"
label=$(docker service inspect -f "$filter" "$STACK_NAME_$SERVICE" 2>/dev/null)
label=$(docker service inspect -f "$filter" "${STACK_NAME}_${SERVICE}" 2>/dev/null)
live_version=$(echo "$label" | cut -d- -f1)
live_digest=$(echo "$label" | cut -d- -f2)
if [ -n "$live_version" ] && [ -n "$live_digest" ]; then