Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate manifests using tooling and configs from osbuild/images #4183

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
  •  
  •  
  •  
555 changes: 0 additions & 555 deletions cmd/gen-manifests/main.go

This file was deleted.

117 changes: 0 additions & 117 deletions cmd/gen-manifests/workerqueue.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/osbuild-image-tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type testcaseStruct struct {
Distro string
Arch string
Filename string
} `json:"compose-request"`
} `json:"build-request"`
Manifest json.RawMessage
ImageInfo json.RawMessage `json:"image-info"`
Boot *struct {
Expand Down
26 changes: 17 additions & 9 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,27 @@ Each file contains a sample manifest for an image configuration and some
metadata describing the request that created the manifest and all the content
(packages, containers, ostree commits).

To (re)generate these test cases use the tool `cmd/gen-manifests`.
To (re)generate these test cases use the tool `./tools/gen-manifests`.
The tool clones the [osbuild/images](https://github.com/osbuild/images)
repository at the version specified in the `go.mod` file and runs the
`cmd/gen-manifests` tool to generate the manifests with the default
configurations.

Manifest generation can be restricted to only some distributions,
architectures, or image types using positional arguments:
- distros: comma-separated list of distribution names to generate manifests for
- arches: comma-separated list of architectures to generate manifests for
- images: comma-separated list of image types to generate manifests for

All three arguments support globs. For example:
```
go run ./cmd/gen-manifests
./tools/gen-manifests `rhel-9.*` `*64*` `*rhui*`
```
will generate all manifests using the default options.

Manifest generation can be restricted to only some distributions,
architectures, or image types using command line flags.
will generate manifests for all RHEL 9.x versions, for `x86_64` and `aarch64`,
and only image types that have `rhui` in their name.

The command uses the configurations in
`tools/test-case-generators/format-request-map.json` and repositories defined
in `tools/test-case-generators/repos.json`.
See the [relevant documentation in osbuild/images](https://github.com/osbuild/images/blob/b002d250372ff468a2250ba0e44ed7e45a501e54/docs/developer/cmds.md#manifest-generation)
for more details on the gen-manifests command.

### Setting up Azure upload tests

Expand Down
Loading
Loading