artifacts

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PvcConfigName is the name of the configmap containing all
	// customizations for the storage PVC.
	PvcConfigName = "config-artifact-pvc"

	// PvcSizeKey is the name of the configmap entry that specifies the size of the PVC to create
	PvcSizeKey = "size"

	// DefaultPvcSize is the default size of the PVC to create
	DefaultPvcSize = "5Gi"

	// PvcStorageClassNameKey is the name of the configmap entry that specifies the storage class of the PVC to create
	PvcStorageClassNameKey = "storageClassName"
)

Variables

This section is empty.

Functions

func CleanupArtifactStorage added in v0.4.0

func CleanupArtifactStorage(pr *v1alpha1.PipelineRun, c kubernetes.Interface, logger *zap.SugaredLogger) 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 added in v0.4.0

func GetPVCName(pr *v1alpha1.PipelineRun) string

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

func GetPVCSpec added in v0.4.0

func GetPVCSpec(pr *v1alpha1.PipelineRun, pvcSize resource.Quantity, storageClassName *string) *corev1.PersistentVolumeClaim

GetPVCSpec returns the PVC to create for a given PipelineRun

func NeedsPVC added in v0.4.0

func NeedsPVC(configMap *corev1.ConfigMap, err error, logger *zap.SugaredLogger) (bool, error)

NeedsPVC checks if the possibly-nil config map passed to it is configured to use a bucket for artifact storage, returning true if instead a PVC is needed.

func NewArtifactBucketConfigFromConfigMap

func NewArtifactBucketConfigFromConfigMap(images pipeline.Images) func(configMap *corev1.ConfigMap) (*v1alpha1.ArtifactBucket, error)

NewArtifactBucketConfigFromConfigMap creates a Bucket from the supplied ConfigMap

Types

type ArtifactStorageInterface

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

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

func GetArtifactStorage

func GetArtifactStorage(images pipeline.Images, prName string, c kubernetes.Interface, logger *zap.SugaredLogger) (ArtifactStorageInterface, error)

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

func InitializeArtifactStorage

func InitializeArtifactStorage(images pipeline.Images, pr *v1alpha1.PipelineRun, c kubernetes.Interface, logger *zap.SugaredLogger) (ArtifactStorageInterface, error)

InitializeArtifactStorage will check if there is there is a bucket configured or create a PVC

Jump to

Keyboard shortcuts

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