From 64a83c35eca1924283ceddfbc602531e089a0ec9 Mon Sep 17 00:00:00 2001 From: Amin Salarkia Date: Fri, 27 Sep 2024 09:28:33 +0200 Subject: [PATCH] fix(cd-service): skip cleanup during releasetrain Ref: SRX-YNEAHU --- services/cd-service/pkg/repository/transformer.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/services/cd-service/pkg/repository/transformer.go b/services/cd-service/pkg/repository/transformer.go index ec5f2b168..cd315a3e2 100644 --- a/services/cd-service/pkg/repository/transformer.go +++ b/services/cd-service/pkg/repository/transformer.go @@ -3043,13 +3043,15 @@ func (c *DeployApplicationVersion) Transform( if err != nil { return "", err } - d := &CleanupOldApplicationVersions{ - Application: c.Application, - TransformerEslVersion: c.TransformerEslVersion, - } + if !c.SkipOverview { + d := &CleanupOldApplicationVersions{ + Application: c.Application, + TransformerEslVersion: c.TransformerEslVersion, + } - if err := t.Execute(d, transaction); err != nil { - return "", err + if err := t.Execute(d, transaction); err != nil { + return "", err + } } if c.WriteCommitData { // write the corresponding event newReleaseCommitId, err := getCommitID(ctx, transaction, state, fs, c.Version, releaseDir, c.Application)