artifacts

package
v0.0.0-...-b563e91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupArtifactStorage

func CleanupArtifactStorage(ctx context.Context, pr *v1beta1.PipelineRun, c kubernetes.Interface) error

CleanupArtifactStorage will delete the PipelineRun's artifact storage PVC if it exists. The PVC is created for using an output workspace or artifacts from one Task to another Task. No other PVCs will be impacted by this cleanup.

func GetPVCName

func GetPVCName(n named) string

GetPVCName returns the name that should be used for the PVC for a PipelineRun

Types

type ArtifactStorageInterface

type ArtifactStorageInterface interface {
	GetCopyToStorageFromSteps(name, sourcePath, destinationPath string) []v1beta1.Step
	GetCopyFromStorageToSteps(name, sourcePath, destinationPath string) []v1beta1.Step
	GetSecretsVolumes() []corev1.Volume
	GetType() string
	StorageBasePath(pr *v1beta1.PipelineRun) string
}

ArtifactStorageInterface is an interface to define the steps to copy an pipeline artifact to/from temporary storage

func GetArtifactStorage

func GetArtifactStorage(ctx context.Context, images pipeline.Images, prName string, c kubernetes.Interface) ArtifactStorageInterface

GetArtifactStorage returns the storage interface to enable consumer code to get a container step for copy to/from storage

func InitializeArtifactStorage

InitializeArtifactStorage will check if there is there is a bucket configured, create a PVC or return nil if no storage is required.

type ArtifactStorageNone

type ArtifactStorageNone struct{}

ArtifactStorageNone is used when no storage is needed.

func (*ArtifactStorageNone) GetCopyFromStorageToSteps

func (a *ArtifactStorageNone) GetCopyFromStorageToSteps(name, sourcePath, destinationPath string) []v1beta1.Step

GetCopyFromStorageToSteps returns no containers because none are needed.

func (*ArtifactStorageNone) GetCopyToStorageFromSteps

func (a *ArtifactStorageNone) GetCopyToStorageFromSteps(name, sourcePath, destinationPath string) []v1beta1.Step

GetCopyToStorageFromSteps returns no containers because none are needed.

func (*ArtifactStorageNone) GetSecretsVolumes

func (a *ArtifactStorageNone) GetSecretsVolumes() []corev1.Volume

GetSecretsVolumes returns no volumes because none are needed.

func (*ArtifactStorageNone) GetType

func (a *ArtifactStorageNone) GetType() string

GetType returns the string "none" to indicate this is the None storage type.

func (*ArtifactStorageNone) StorageBasePath

func (a *ArtifactStorageNone) StorageBasePath(pr *v1beta1.PipelineRun) string

StorageBasePath returns an empty string because no storage is being used and so there is no path that resources should be copied from / to.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL