Use STACK_NAME instead of Gitea

This commit is contained in:
decentral1se 2021-03-15 18:56:26 +01:00
parent e99bedf9e4
commit 524fb6a44c
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A

4
abra
View File

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