Skip to content

Commit c5cbae9

Browse files
committed
add log
Signed-off-by: Somtochi Onyekwere <[email protected]>
1 parent 2e32e12 commit c5cbae9

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

tests/integration/utils.go

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ package integration
1919
import (
2020
"context"
2121
"fmt"
22-
"github.com/fluxcd/test-infra/tftestenv"
22+
"log"
2323
"path"
2424
"strings"
25+
26+
"github.com/fluxcd/test-infra/tftestenv"
2527
)
2628

2729
// updateAndBuildFluxInstallManifests assumes that ./build/flux/ already exists
2830
// with downloaded install.yaml and copied kustomization.yaml. It updates the
29-
// kustomization.yaml with new test images and builds a new install manifest
31+
// kustomization.yaml with new test images and patchkes. Then it builds a new install manifest
3032
// at ./build/flux.yaml.
3133
func updateAndBuildFluxInstallManifests(ctx context.Context, images map[string]string, patches []string) error {
3234
// Construct kustomize set image arguments.
@@ -39,6 +41,16 @@ func updateAndBuildFluxInstallManifests(ctx context.Context, images map[string]s
3941
setImgArgs = append(setImgArgs, arg)
4042
}
4143

44+
log.Println("setting images:", setImgArgs)
45+
// Update all the images in kustomization.
46+
err := tftestenv.RunCommand(ctx, "./build/flux",
47+
fmt.Sprintf("kustomize edit set image %s", strings.Join(setImgArgs, " ")),
48+
tftestenv.RunCommandOptions{},
49+
)
50+
if err != nil {
51+
return err
52+
}
53+
4254
for _, patch := range patches {
4355
// add patches to kustomization.
4456
err := tftestenv.RunCommand(ctx, "./build/flux",
@@ -50,15 +62,6 @@ func updateAndBuildFluxInstallManifests(ctx context.Context, images map[string]s
5062
}
5163
}
5264

53-
// Update all the images in kustomization.
54-
err := tftestenv.RunCommand(ctx, "./build/flux",
55-
fmt.Sprintf("kustomize edit set image %s", strings.Join(setImgArgs, " ")),
56-
tftestenv.RunCommandOptions{},
57-
)
58-
if err != nil {
59-
return err
60-
}
61-
6265
// Build install manifest.
6366
err = tftestenv.RunCommand(ctx, "./",
6467
"kustomize build build/flux > build/flux.yaml",

0 commit comments

Comments
 (0)