Skip to content

Commit

Permalink
build-extensions-container: add more logging
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
jlebon committed Oct 27, 2022
1 parent 0cb63a8 commit 0086c71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/build-extensions-container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -94,5 +97,7 @@ func buildExtensionContainer() error {
if err != nil {
return err
}

fmt.Printf("Updated %s\n", metapath)
return nil
}
1 change: 1 addition & 0 deletions src/cmd-buildextend-legacy-oscontainer
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

0 comments on commit 0086c71

Please sign in to comment.