cmd: implement manifest command
This commit implements the `manifest` command for `image-builder`.
It will generate an osbuild manifest based on the given inputs,
e.g.:
```
$ ./image-builder manifest centos-9 qcow2
{"version":"2","pipelines":[{"name":"build","runner":",...
```
Note that there is an integration test but because of the depsolve
it will be slow. It will be skipped when doing `go test -short`.
This commit is contained in:
parent
ea61ef593f
commit
830528fa15
5 changed files with 91 additions and 16 deletions
|
|
@ -4,8 +4,8 @@ import (
|
|||
"github.com/osbuild/images/pkg/imagefilter"
|
||||
)
|
||||
|
||||
func listImages(output string, filterExprs []string, opts *cmdlineOpts) error {
|
||||
imageFilter, err := newImageFilterDefault(opts.dataDir)
|
||||
func listImages(dataDir, output string, filterExprs []string) error {
|
||||
imageFilter, err := newImageFilterDefault(dataDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ func listImages(output string, filterExprs []string, opts *cmdlineOpts) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := fmter.Output(opts.out, filteredResult); err != nil {
|
||||
if err := fmter.Output(osStdout, filteredResult); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue