Skip to content

Commit

Permalink
stage(skopeo): rename destination and ctor
Browse files Browse the repository at this point in the history
Rename the destination type and constructor for introduction of the
alternative destination type.
  • Loading branch information
supakeen authored and achilleas-k committed Dec 15, 2023
1 parent b9961d9 commit a94b711
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/manifest/os.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ func (p *OS) serialize() osbuild.Pipeline {
}

manifests := osbuild.NewFilesInputForManifestLists(p.containerSpecs)
skopeo := osbuild.NewSkopeoStage(storagePath, images, manifests)
skopeo := osbuild.NewSkopeoStageWithContainersStorage(storagePath, images, manifests)
pipeline.AddStage(skopeo)
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/osbuild/skopeo_stage.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package osbuild

type SkopeoDestination struct {
type SkopeoDestinationContainersStorage struct {
Type string `json:"type"`
StoragePath string `json:"storage-path,omitempty"`
StorageDriver string `json:"storage-driver,omitempty"`
}

type SkopeoStageOptions struct {
Destination SkopeoDestination `json:"destination"`
DestinationContainersStorage SkopeoDestinationContainersStorage `json:"destination"`
}

func (o SkopeoStageOptions) isStageOptions() {}
Expand All @@ -19,7 +19,7 @@ type SkopeoStageInputs struct {

func (SkopeoStageInputs) isStageInputs() {}

func NewSkopeoStage(path string, images ContainersInput, manifests *FilesInput) *Stage {
func NewSkopeoStageWithContainersStorage(path string, images ContainersInput, manifests *FilesInput) *Stage {

inputs := SkopeoStageInputs{
Images: images,
Expand All @@ -29,7 +29,7 @@ func NewSkopeoStage(path string, images ContainersInput, manifests *FilesInput)
return &Stage{
Type: "org.osbuild.skopeo",
Options: &SkopeoStageOptions{
Destination: SkopeoDestination{
DestinationContainersStorage: SkopeoDestinationContainersStorage{
Type: "containers-storage",
StoragePath: path,
},
Expand Down

0 comments on commit a94b711

Please sign in to comment.