Skip to content

Commit

Permalink
cmd/build: support checkpoints in build command
Browse files Browse the repository at this point in the history
Support specifying checkpoints when running cmd/build.
  • Loading branch information
achilleas-k committed Aug 27, 2024
1 parent 5ca8b62 commit e5758c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ func run() error {
flag.StringVar(&osbuildStore, "store", ".osbuild", "osbuild store for intermediate pipeline trees")
flag.StringVar(&rpmCacheRoot, "rpmmd", "/tmp/rpmmd", "rpm metadata cache directory")

// osbuild checkpoint arg
var checkpoints cmdutil.MultiValue
flag.Var(&checkpoints, "checkpoints", "comma-separated list of pipeline names to checkpoint (passed to osbuild --checkpoint)")

// image selection args
var distroName, imgTypeName, configFile string
flag.StringVar(&distroName, "distro", "", "distribution (required)")
Expand Down Expand Up @@ -263,7 +267,7 @@ func run() error {
fmt.Printf("Building manifest: %s\n", manifestPath)

jobOutput := filepath.Join(outputDir, buildName)
_, err = osbuild.RunOSBuild(mf, osbuildStore, jobOutput, imgType.Exports(), nil, nil, false, os.Stderr)
_, err = osbuild.RunOSBuild(mf, osbuildStore, jobOutput, imgType.Exports(), checkpoints, nil, false, os.Stderr)
if err != nil {
return err
}
Expand Down

0 comments on commit e5758c3

Please sign in to comment.