From cf5a4b8525a09fb150aafee8087ed77a28dee65f Mon Sep 17 00:00:00 2001 From: Simon de Vlieger Date: Wed, 13 Dec 2023 11:42:13 +0100 Subject: [PATCH] stage(skopeo): rename destination and ctor Rename the destination type and constructor for introduction of the alternative destination type. --- pkg/manifest/os.go | 2 +- pkg/osbuild/skopeo_stage.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/manifest/os.go b/pkg/manifest/os.go index 2e03174668..c2dd8f248d 100644 --- a/pkg/manifest/os.go +++ b/pkg/manifest/os.go @@ -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) } diff --git a/pkg/osbuild/skopeo_stage.go b/pkg/osbuild/skopeo_stage.go index 57e6f9e3d1..a4156733aa 100644 --- a/pkg/osbuild/skopeo_stage.go +++ b/pkg/osbuild/skopeo_stage.go @@ -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() {} @@ -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, @@ -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, },