This commit checks that the `--progress` argument generates the
expected output, i.e. with `term` we will not get any osbuild
output and the spinner. And with `verbose` we will not get a
spinner and the osbuild output.
This is a very sad commit, it copies the code to make a fake
container with a faked osbuild.
The bright side is that the plan is to rewrite these helpers
in go and then we can just have a shared testutil module that
can be imported from both bib/ibcli.
And/or the two repos will merge and its just a (simple) test
helper. But I do not feel good (at all) about this.
This commit add progress reporting similar to what `bib` is doing.
It imports the progress from `bootc-image-builder` for now. There
is an open PR for moving this to images but there are some
concerns about moving it there so for now we just use bib.
This is not too bad because eventually bib and ibcli will merge.
This now precreates the directory as it's possible that the directory
doesn't exist yet at this point; see #94.
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
Having this test triggers the conditions for #94. This test case is
failing and the next commit fixes the bug.
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
For some reason on a bunch of my systems `platform.processor()` always
returns an empty string. `platform.machine()` consistently works on
those systems.
This closes#95.
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
Running the tests inside fedora means we get much more meaningful
results as we will have all the required packaes and there will
be no need to skip tests.
When reading `--blueprint string`, I briefly thought it might
also be possible to put a whole blueprint content as string
into image-builder-cli argument.
This wording should avoid misunderstandings.
Use go-vendor-tools to generate the license identifiers for our vendored
code. This initial commit does not yet apply the rest of go-vendor-tools
abilities to manage the vendoring itself.
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit adds support for `--extra-artifacts=manifest`. If
that is given as part of the build an extra artifacts called
`<img-name>.osbuild-manifest.json` will be created in the
output directory.
Closes: https://github.com/osbuild/image-builder-cli/issues/42
The Go macros have a bunch of expectations about package names and
archive names. Let's keep the archive names with `-cli` in them to
appease them.
These can only be dropped after we change repositories around and thus
change the `goipath`; after which these can drop their `-cli`.
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
`image-builder` will be the main entrypoint into the Image Builder
stack. We will rename the repositories later on; but let's start
referring to it in its new official name.
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit adds a new `--output-dir` option to override the
default output directory for the generated artifacts.
Note that this can also be used together with `manifest` when
extra artifacts (like the sbom) is requested.
This commit adds an option --extra-artifacts that can be
used to generate extra artifacts during the build or manifest
generation. Initially supported is `sbom` (but `manifest` is
planned too).
To use it run `--extra-artifacts=sbom` and it will generate
files like `centos-9-qcow2-x86_64.image-os.spdx.json` in
the output directory next to the generate runable artifact.
Closes: https://github.com/osbuild/image-builder-cli/issues/46
This commit adds a (smoke) integration test for librepo based
manifests. It needs a flanking test that also ensures that
--use-librepo really generates librepo sources.
This commit switches the default to librepo. We do not have many
users yet so this is a great place to test the new librepo
functionality. It also is much more stable for fedora/centos
systems that often have flaky mirrors.
This also bumps the minimum required version of osbuild.
This commit changes the signature of depsolve in `manifestgen`
to return the full `dnfjson.DepsolveResult`. This gives us
access to the sbom and also is a preparation for images PR#1142
where we will need this anyway.