From a31a25cfa11dc8389dd241a1b05da7c122fe6aca Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 10 Sep 2025 21:44:12 +0200 Subject: [PATCH] fix: show no images if no diff required --- cli/internal/deploy.go | 10 ++++++++-- tests/integration/app_deploy.bats | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cli/internal/deploy.go b/cli/internal/deploy.go index 00d8650b..3b1fa5b7 100644 --- a/cli/internal/deploy.go +++ b/cli/internal/deploy.go @@ -83,8 +83,14 @@ func DeployOverview( {i18n.G("CURRENT DEPLOYMENT"), formatter.BoldDirtyDefault(deployedVersion)}, {i18n.G("ENV VERSION"), formatter.BoldDirtyDefault(envVersion)}, {i18n.G("NEW DEPLOYMENT"), formatter.BoldDirtyDefault(toDeployVersion)}, - {"", ""}, - {i18n.G("IMAGES"), strings.Join(images, "\n")}, + } + + if len(images) > 0 { + imageRows := [][]string{ + {"", ""}, + {i18n.G("IMAGES"), strings.Join(images, "\n")}, + } + rows = append(rows, imageRows...) } if len(secrets) > 0 { diff --git a/tests/integration/app_deploy.bats b/tests/integration/app_deploy.bats index 7cae6823..0d94a4a8 100644 --- a/tests/integration/app_deploy.bats +++ b/tests/integration/app_deploy.bats @@ -551,3 +551,13 @@ teardown(){ assert_success refute_output --regexp "coop-cloud.abra-test-recipe.$TEST_SERVER.chaos-version" } + +# bats test_tags=slow +@test "no IMAGES diff if no images change" { + run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks + assert_success + + run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks --force + assert_success + refute_output --partial "IMAGES" +}