parent
df4e5045be
commit
c3e3f0a1f8
19
abra
19
abra
@ -614,19 +614,20 @@ output_version_summary() {
|
||||
live_digest=$(echo "$label" | cut -d- -f2)
|
||||
|
||||
if [ -n "$live_version" ] && [ -n "$live_digest" ]; then
|
||||
image=$($YQ e ".services.${SERVICE}.image" "${APP_DIR}/${COMPOSE}" | cut -d':' -f1)
|
||||
service_data=$($YQ e ".services.${SERVICE}" "${APP_DIR}/${COMPOSE}")
|
||||
service_image=$(echo "$service_data" | $YQ e ".image" - | cut -d':' -f1)
|
||||
service_version=$(echo "$service_data" | $YQ e ".deploy.labels[] | select(. == \"coop*\")" - | cut -d'=' -f2)
|
||||
service_tag="${service_version%-*}"
|
||||
service_digest="${service_version##*-}"
|
||||
|
||||
echo " ${STACK_NAME}_${SERVICE} (${image}):"
|
||||
echo " ${STACK_NAME}_${SERVICE} (${service_image}):"
|
||||
echo " deployed: $(tput setaf 2)$live_version ($live_digest)$(tput sgr0)"
|
||||
|
||||
app_version_lookup="ABRA_TYPE_${SERVICE^^}_VERSION"
|
||||
app_version=${!app_version_lookup}
|
||||
app_digest_lookup="ABRA_TYPE_${SERVICE^^}_DIGEST"
|
||||
app_digest=${!app_digest_lookup}
|
||||
|
||||
if [ "$live_version" != "$app_version" ] || [ "$live_digest" != "$app_digest" ]; then
|
||||
if [[ -z "$IS_VERSION_CHECK" ]] || [[ "$IS_VERSION_CHECK" != "true" ]]; then
|
||||
if [ "$live_version" != "$service_tag" ] || [ "$live_digest" != "$service_digest" ]; then
|
||||
IS_AN_UPDATE="true"
|
||||
echo " to de deployed: $(tput setaf 1)$app_version ($app_digest)$(tput sgr0)"
|
||||
fi
|
||||
echo " to be deployed: $(tput setaf 1)$service_version ($service_digest)$(tput sgr0)"
|
||||
fi
|
||||
else
|
||||
if [[ $UNDEPLOYED_STATE == "true" ]]; then
|
||||
|
Reference in New Issue
Block a user