From 0086c71ecb61670f0a788908a7b4907feef875c9 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 25 Oct 2022 11:43:45 -0400 Subject: [PATCH] build-extensions-container: add more logging Log when the `extensions-container` artifact was built, and at the very end when `meta.json` was updated. This makes it easier to tell when looking at pipeline output that the command successfully finished. While we're here, do the same for `cmd-buildextend-legacy-oscontainer`. --- cmd/build-extensions-container.go | 5 +++++ src/cmd-buildextend-legacy-oscontainer | 1 + 2 files changed, 6 insertions(+) diff --git a/cmd/build-extensions-container.go b/cmd/build-extensions-container.go index 11f5518e6a..bdf42c1604 100644 --- a/cmd/build-extensions-container.go +++ b/cmd/build-extensions-container.go @@ -45,6 +45,9 @@ func buildExtensionContainer() error { if err := exec.Command("/usr/lib/coreos-assembler/finalize-artifact", filepath.Join(tmpdir, targetname), targetPath).Run(); err != nil { return err } + + fmt.Printf("Built %s\n", targetPath) + // Gather metadata of the OCI archive (sha256, size) file, err := os.Open(targetPath) if err != nil { @@ -94,5 +97,7 @@ func buildExtensionContainer() error { if err != nil { return err } + + fmt.Printf("Updated %s\n", metapath) return nil } diff --git a/src/cmd-buildextend-legacy-oscontainer b/src/cmd-buildextend-legacy-oscontainer index 3e70305f05..eaa7f07288 100755 --- a/src/cmd-buildextend-legacy-oscontainer +++ b/src/cmd-buildextend-legacy-oscontainer @@ -126,3 +126,4 @@ metapath_new = f"{metapath}.new" with open(metapath_new, 'w') as f: json.dump(meta, f, sort_keys=True) shutil.move(metapath_new, metapath) +print(f"Updated {metapath}")