Commit graph

12 commits

Author SHA1 Message Date
Achilleas Koutsou
99952afbd4 Separate ostree ref from parent spec in Pipelines and ImageKinds
In the OS pipeline, the parent configuration was used to detect if the
pipeline's setup was meant for an ostree commit or not.  Also, the
pipeline used a new type to specify the ostree parameters.

- Use the ostree.CommitSpec for the parent configuration.
- Add a new attribute, OSTreeRef, that defines the ref for the ostree
  commit being built.  An empty string indicates that the tree is not
  for an ostree commit.

Additionally, in the ImageKind configurations for the ostree archive and
container, separate the ostree ref from the parent spec, make the parent
spec optional (pointer) and the ostree ref mandatory, by requiring it in
the constructor of the ImageKind.
2022-10-11 10:00:22 +02:00
Achilleas Koutsou
3d772b6846 osbuild: simplify and unify tree stage inputs
- Remove stage-specific input types when they are org.osbuild.tree input
  types.
- Use PipelineTreeInputs when stage requires a single tree input
  reference with an arbitrary key.
- For Stages that require a specific key with a tree input, make the key
  part of the NewXStage() function and only allow specifying the name of
  the pipeline from which to copy the tree as part of the function
  arguments.
2022-09-29 18:09:38 +02:00
Achilleas Koutsou
9d4a351ca6 Rename osbuild2 package to osbuild 2022-07-14 16:54:00 +02:00
Tom Gundersen
d00b98c134 manifest: don't stutter
Replace `pipeline.OSPipeline` with `pipeline.OS`, etc.

Also rename `LiveImg` to `RawImage`.
2022-07-12 08:19:57 +01:00
Tom Gundersen
529bc803db runner: introduce runner abstraction
For now all it does is represent the name of the runner and what requirements
it has of the build pipeline.

Move some package definitions from the runner package set to where it belongs.
2022-07-12 08:19:57 +01:00
Tom Gundersen
64b4ad7c31 manifest/os: make ostree parameters optional
The OSTree parameters can be set after initialisation. We should only require parameters
to be set at initialisation time if we have no good defaults. In the case of OSTree the
default is to not enable OSTree support.
2022-07-05 12:15:50 +02:00
Tom Gundersen
70d7a25a8e manifest: build packages - move over 'rpm-ostree'
Move `iotBuildPackages()` from the distro to the pipelines.
2022-07-04 23:04:29 +01:00
Tom Gundersen
4961a17ba8 manifest: implicitly track pipelines in manifest
Pipelines are now added to their manifest on creation, and we
ensure that dependants are associated with the same manifest.
2022-07-04 23:04:29 +01:00
Tom Gundersen
fc08579c29 manifest/build: implement getPackageSetChain
A build pipeline now tracks all its dependents, and each pipeline
now implements a `getBuildPackages()` method. For now those
return the empty slice, but will be extended by each pipeline in the
future.

`getPackageSetChain() of the build pipeline simply collects all the
build package sets of its dependents.
2022-07-04 23:04:29 +01:00
Tom Gundersen
0743eb2f81 manifest: use call-by-reference in pipeline interface
This allows interface methods to modify the state of the pipeline
objects. We will use this in subsequent patches.
2022-07-04 23:04:29 +01:00
Tom Gundersen
6940853215 manifest: remove unused public functions from pipelines
These were only used from the manifest package, make them internal,
or read private fields directly.
2022-07-04 23:04:29 +01:00
Tom Gundersen
f791bde0e4 pipeline: fully encapsulate manifest generation
Make it the responsibility of each pipeline to track its required
sources, and use this to generate a manifest from its pipelines.

This removes the dependency on osbuild2 from distro.go, and the
only other uses of osbuild2 are to specify parameters in
ImageConfig, which will eventually go away too.

As a consequence, this only attaches the required sources for a
given manifest, rather than all known packages in the package set
map.
2022-07-04 23:04:29 +01:00
Renamed from internal/pipeline/commit.go (Browse further)