-
Notifications
You must be signed in to change notification settings - Fork 81
Support raw payloads in yaml partition info #1829
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ func (img *BootcDiskImage) InstantiateManifestFromContainers(m *manifest.Manifes | |
| var copyFilesFrom map[string][]string | ||
| var ensureDirs []*fsnode.Directory | ||
|
|
||
| var customSourcePipeline = "" | ||
| if *img.ContainerSource != *img.BuildContainerSource { | ||
| // If we're using a different build container from the target container then we copy | ||
| // the bootc customization file directories from the target container. This includes the | ||
|
|
@@ -79,6 +80,8 @@ func (img *BootcDiskImage) InstantiateManifestFromContainers(m *manifest.Manifes | |
| EnsureDirs: ensureDirs, | ||
| }) | ||
| targetBuildPipeline.Checkpoint() | ||
|
|
||
| customSourcePipeline = targetBuildPipeline.Name() | ||
| } | ||
|
|
||
| buildContainers := []container.SourceSpec{*img.BuildContainerSource} | ||
|
|
@@ -97,6 +100,9 @@ func (img *BootcDiskImage) InstantiateManifestFromContainers(m *manifest.Manifes | |
| var hostPipeline manifest.Build | ||
|
|
||
| rawImage := manifest.NewRawBootcImage(buildPipeline, containers, img.platform) | ||
| if customSourcePipeline != "" { | ||
| rawImage.SourcePipeline = customSourcePipeline | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked a bit into writing a test for this but I couldn't come up with something nice :( I think we should just do an end-to-end test with something like #1828 that generates a manifest and then we can check the source pipeline settings (or a maybe even a real one in addition that creates a custom bootc container with a real disk.yaml and a real payload, but definitely followup material for us, don't worry about it :) |
||
| } | ||
| rawImage.PartitionTable = img.PartitionTable | ||
| rawImage.Users = img.OSCustomizations.Users | ||
| rawImage.Groups = img.OSCustomizations.Groups | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(super nitpick) it would be slightly idiomatic to just have:
here.