main: add build --with-buildlog
This commit adds a new `--with-buildlog` option that will automatically create a buildlog in the output directory.
This commit is contained in:
parent
55d3b4916a
commit
2e741a70ad
3 changed files with 116 additions and 19 deletions
|
|
@ -207,6 +207,11 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
withBuildlog, err := cmd.Flags().GetBool("with-buildlog")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pbar, err := progressFromCmd(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -257,6 +262,7 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
|
|||
OutputDir: outputDir,
|
||||
StoreDir: cacheDir,
|
||||
WriteManifest: withManifest,
|
||||
WriteBuildlog: withBuildlog,
|
||||
}
|
||||
pbar.SetPulseMsgf("Image building step")
|
||||
if err := buildImage(pbar, res, mf.Bytes(), buildOpts); err != nil {
|
||||
|
|
@ -379,6 +385,7 @@ operating systems like Fedora, CentOS and RHEL with easy customizations support.
|
|||
}
|
||||
buildCmd.Flags().AddFlagSet(manifestCmd.Flags())
|
||||
buildCmd.Flags().Bool("with-manifest", false, `export osbuild manifest`)
|
||||
buildCmd.Flags().Bool("with-buildlog", false, `export osbuild buildlog`)
|
||||
// XXX: add --rpmmd cache too and put under /var/cache/image-builder/dnf
|
||||
buildCmd.Flags().String("cache", "/var/cache/image-builder/store", `osbuild directory to cache intermediate build artifacts"`)
|
||||
// XXX: add "--verbose" here, similar to how bib is doing this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue