From 9e953319cf1448f234f4341a78e646d7517ed143 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 16 Mar 2021 09:23:13 +0100 Subject: [PATCH] Get label parsing done correctly --- app-version.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app-version.sh b/app-version.sh index 48b9a35..4bcc143 100755 --- a/app-version.sh +++ b/app-version.sh @@ -22,5 +22,21 @@ fi version=$(echo "$IMAGE" | cut -d ':' -f2) digest=$(docker image inspect -f "{{.Id}}" "$IMAGE" | cut -d ':' -f2- | cut -c 1-8) +echo "--- Add the following to your abra.sh ---" echo "export ABRA_TYPE_${SERVICE^^}_VERSION=${version}" echo "export ABRA_TYPE_${SERVICE^^}_DIGEST=${digest}" + +version_lookup="ABRA_TYPE_${SERVICE^^}_VERSION" +digest_lookup="ABRA_TYPE_${SERVICE^^}_DIGEST" + +label='- "coop-cloud.${STACK_NAME}.' +label+="${SERVICE}" +label+='.version=${' +label+="${version_lookup}" +label+='}-${' +label+="${digest_lookup}" +label+='}' + +echo +echo "--- And don't forget to label the actual service in the compose file ---" +echo "$label"