Merge branch 'main' into feature/special_charset_secret_generation

This commit is contained in:
p4u1 2025-03-21 10:26:58 +00:00
commit bbf0fb0659
2 changed files with 23 additions and 5 deletions

View File

@ -14,6 +14,7 @@ import (
"coopcloud.tech/abra/pkg/formatter"
"coopcloud.tech/abra/pkg/lint"
"coopcloud.tech/abra/pkg/log"
"coopcloud.tech/abra/pkg/recipe"
stack "coopcloud.tech/abra/pkg/upstream/stack"
"coopcloud.tech/tagcmp"
"github.com/AlecAivazis/survey/v2"
@ -69,7 +70,13 @@ beforehand. See "abra app backup" for more.`,
app := internal.ValidateApp(args)
if err := app.Recipe.Ensure(internal.GetEnsureContext()); err != nil {
if err := app.Recipe.Ensure(recipe.EnsureContext{
Chaos: internal.Chaos,
Offline: internal.Offline,
// Ignore the env version for now, to make sure we are at the latest commit.
// This enables us to get release notes, that were added after a release.
IgnoreEnvVersion: true,
}); err != nil {
log.Fatal(err)
}
@ -142,10 +149,9 @@ beforehand. See "abra app backup" for more.`,
log.Debugf("choosing %s as version to upgrade", chosenUpgrade)
// NOTE(d1): if release notes written after git tag published, read them
// before we check out the tag and then they'll appear to be missing. this
// covers when we obviously will forget to write release notes before
// publishing
// Get the release notes before checking out the new version in the
// recipe. This enables us to get release notes, that were added after
// a release.
if err := getReleaseNotes(app, versions, chosenUpgrade, deployMeta, &upgradeReleaseNotes); err != nil {
log.Fatal(err)
}

View File

@ -204,6 +204,18 @@ teardown(){
assert_output --partial 'release notes baz' # 0.2.0+1.21.0
}
# bats test_tags=slow
@test "show release note added after release" {
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.2.0+1.21.0" --no-input --no-converge-checks
assert_success
assert_output --partial '0.2.0+1.21.0'
run $ABRA app upgrade "$TEST_APP_DOMAIN" "0.3.0+1.21.0" --no-input --no-converge-checks
assert_success
assert_output --partial '0.3.0+1.21.0'
assert_output --partial 'A release note added after the release'
}
# bats test_tags=slow
@test "upgrade commit deployment not possible" {
tagHash=$(_get_tag_hash "0.1.0+1.20.0")