Documentation ¶
Index ¶
- Constants
- type Catalog
- func (c *Catalog) BuildRunWithBuildSnapshot(buildRunName string, buildName string) *build.BuildRun
- func (c *Catalog) BuildRunWithExistingOwnerReferences(buildRunName string, buildName string, ownerName string) *build.BuildRun
- func (c *Catalog) BuildRunWithFakeNamespace(buildRunName string, buildName string) *build.BuildRun
- func (c *Catalog) BuildRunWithSA(buildRunName string, buildName string, saName string) *build.BuildRun
- func (c *Catalog) BuildRunWithSAGenerate(buildRunName string, buildName string) *build.BuildRun
- func (c *Catalog) BuildRunWithSucceededCondition() *build.BuildRun
- func (c *Catalog) BuildRunWithoutSA(buildRunName string, buildName string) *build.BuildRun
- func (c *Catalog) BuildWithBuildRunDeletions(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
- func (c *Catalog) BuildWithBuildRunDeletionsAndFakeNS(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
- func (c *Catalog) BuildWithBuildStrategy(name string, ns string, strategyName string) *build.Build
- func (c *Catalog) BuildWithClusterBuildStrategy(name string, ns string, strategyName string, secretName string) *build.Build
- func (c *Catalog) BuildWithClusterBuildStrategyAndFalseSourceAnnotation(name string, ns string, strategyName string) *build.Build
- func (c *Catalog) BuildWithClusterBuildStrategyAndSourceSecret(name string, ns string, strategyName string) *build.Build
- func (c *Catalog) BuildWithNilBuildStrategyKind(name string, ns string, strategyName string) *build.Build
- func (c *Catalog) BuildWithOutputSecret(name string, ns string, secretName string) *build.Build
- func (c *Catalog) BuildWithoutStrategyKind(buildName string, strategyName string) *build.Build
- func (c *Catalog) ClusterBuildStrategy(name string) *build.ClusterBuildStrategy
- func (c *Catalog) ConfigMapWithData(name string, ns string, data map[string]string) *corev1.ConfigMap
- func (c *Catalog) DefaultBuild(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
- func (c *Catalog) DefaultBuildRun(buildRunName string, buildName string) *build.BuildRun
- func (c *Catalog) DefaultBuildWithFalseRegistered(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
- func (c *Catalog) DefaultClusterBuildStrategy() *build.ClusterBuildStrategy
- func (c *Catalog) DefaultNamespacedBuildStrategy() *build.BuildStrategy
- func (c *Catalog) DefaultServiceAccount(name string) *corev1.ServiceAccount
- func (c *Catalog) DefaultTaskRun(taskRunName string, ns string) *pipelineapi.TaskRun
- func (c *Catalog) DefaultTaskRunWithFalseStatus(trName string, buildRunName string, ns string) *pipelineapi.TaskRun
- func (c *Catalog) DefaultTaskRunWithStatus(trName string, buildRunName string, ns string, status corev1.ConditionStatus, ...) *pipelineapi.TaskRun
- func (c *Catalog) FakeClusterBuildStrategyNotFound(name string) error
- func (c *Catalog) LoadBRWithNameAndRef(name string, buildName string, d []byte) (*build.BuildRun, error)
- func (c *Catalog) LoadBuildRunFromBytes(d []byte) (*build.BuildRun, error)
- func (c *Catalog) LoadBuildStrategyFromBytes(d []byte) (*build.BuildStrategy, error)
- func (c *Catalog) LoadBuildWithNameAndStrategy(name string, strategy string, d []byte) (*build.Build, error)
- func (c *Catalog) LoadBuildYAML(d []byte) (*build.Build, error)
- func (c *Catalog) LoadCBSWithName(name string, d []byte) (*build.ClusterBuildStrategy, error)
- func (c *Catalog) LoadCustomResources(cpu string, mem string) corev1.ResourceRequirements
- func (c *Catalog) LoadStandAloneBuildRunWithNameAndStrategy(name string, strategy *build.ClusterBuildStrategy, d []byte) (*build.BuildRun, error)
- func (c *Catalog) PodWithInitContainerStatus(podName string, initContainerName string) *corev1.Pod
- func (c *Catalog) SecretWithAnnotation(name string, ns string) *corev1.Secret
- func (c *Catalog) SecretWithDockerConfigJson(name string, ns string, host string, username string, password string) *corev1.Secret
- func (c *Catalog) SecretWithStringData(name string, ns string, stringData map[string]string) *corev1.Secret
- func (c *Catalog) SecretWithoutAnnotation(name string, ns string) *corev1.Secret
- func (c *Catalog) ServiceAccountWithControllerRef(name string) *corev1.ServiceAccount
- func (c *Catalog) StubBuildAndTaskRun(b *build.Build, tr *pipelineapi.TaskRun) ...
- func (c *Catalog) StubBuildCRDs(b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, ...) ...
- func (c *Catalog) StubBuildCRDsPodAndTaskRun(b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, ...) ...
- func (c *Catalog) StubBuildRun(b *build.BuildRun) ...
- func (c *Catalog) StubBuildRunAndTaskRun(b *build.BuildRun, tr *pipelineapi.TaskRun) ...
- func (c *Catalog) StubBuildRunGetWithSA(b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount) ...
- func (c *Catalog) StubBuildRunGetWithSAandStrategies(b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, ...) ...
- func (c *Catalog) StubBuildRunGetWithTaskRunAndSA(b *build.Build, br *build.BuildRun, tr *pipelineapi.TaskRun, ...) ...
- func (c *Catalog) StubBuildRunGetWithoutSA(b *build.Build, br *build.BuildRun) ...
- func (c *Catalog) StubBuildRunLabel(buildSample *build.Build) ...
- func (c *Catalog) StubBuildRunStatus(reason string, name *string, condition build.Condition, ...) func(context context.Context, object client.Object, ...) error
- func (c *Catalog) StubBuildStatusReason(reason build.BuildReason, message string) func(context context.Context, object client.Object, ...) error
- func (c *Catalog) StubBuildUpdateOwnerReferences(ownerKind string, ownerName string, isOwnerController *bool, ...) ...
- func (c *Catalog) StubFunc(status corev1.ConditionStatus, reason build.BuildReason, message string) func(context context.Context, object client.Object, ...) error
- func (c *Catalog) TaskRunWithCompletionAndStartTime(trName string, buildRunName string, ns string) *pipelineapi.TaskRun
- func (c *Catalog) TaskRunWithStatus(trName string, ns string) *pipelineapi.TaskRun
Constants ¶
const BuildBSMinimal = `` /* 247-byte string literal not displayed */
BuildBSMinimal defines a Build with a BuildStrategy
const BuildBSMinimalNoSource = `` /* 196-byte string literal not displayed */
BuildBSMinimalNoSource defines a Build with a BuildStrategy without sources
const BuildCBSMinimal = `` /* 283-byte string literal not displayed */
BuildCBSMinimal defines a Build with a ClusterBuildStrategy
const BuildCBSMinimalWithFakeSecret = `` /* 295-byte string literal not displayed */
BuildCBSMinimalWithFakeSecret defines a Build with a ClusterBuildStrategy and an not existing secret
const BuildCBSWithBuildRunDeletion = `` /* 330-byte string literal not displayed */
BuildCBSWithBuildRunDeletion defines a Build with a ClusterBuildStrategy and the annotation for automatic BuildRun deletion
const BuildCBSWithShortTimeOut = `` /* 268-byte string literal not displayed */
BuildCBSWithShortTimeOut defines a Build with a ClusterBuildStrategy and a short timeout
const BuildCBSWithShortTimeOutAndRefOutputSecret = `` /* 310-byte string literal not displayed */
BuildCBSWithShortTimeOutAndRefOutputSecret defines a Build with a ClusterBuildStrategy, a short timeout and an output secret
const BuildCBSWithVerifyRepositoryAnnotation = `` /* 261-byte string literal not displayed */
BuildCBSWithVerifyRepositoryAnnotation defines a Build with the verify repository annotation key
const BuildCBSWithWrongURL = `` /* 325-byte string literal not displayed */
BuildCBSWithWrongURL defines a Build with a ClusterBuildStrategy and a non-existing url
const BuildCBSWithoutVerifyRepositoryAnnotation = `` /* 190-byte string literal not displayed */
BuildCBSWithoutVerifyRepositoryAnnotation defines a minimal Build without source url and annotation
const BuildStrategyWithErrorResult = `` /* 408-byte string literal not displayed */
BuildStrategyWithErrorResult is a strategy that always fails and surfaces and error reason and message to the user
const BuildStrategyWithParameterVerification = `` /* 1588-byte string literal not displayed */
BuildStrategyWithParameterVerification is a strategy that verifies that parameters can be used at all expected places
const BuildStrategyWithParameters = `` /* 691-byte string literal not displayed */
BuildStrategyWithParameters is a strategy that uses a sleep command with a value for its spec.parameters
const BuildStrategyWithoutDefaultInParameter = `` /* 317-byte string literal not displayed */
BuildStrategyWithoutDefaultInParameter is a strategy that uses a sleep command with a value from its spec.parameters, where the parameter have no default
const BuildStrategyWithoutPush = `` /* 302-byte string literal not displayed */
BuildStrategyWithoutPush is a strategy that writes an image tarball and pushes nothing
const BuildWithArrayParam = `` /* 331-byte string literal not displayed */
BuildWithArrayParam defines a Build with an array parameter
const BuildWithBuilderRefSecret = `` /* 352-byte string literal not displayed */
BuildWithBuilderRefSecret defines a Build with a referenced secret under spec.builder
const BuildWithConfigMapSecretParams = `` /* 484-byte string literal not displayed */
BuildWithConfigMapSecretParams defines a Build with parameter values referencing a ConfigMap and Secret
const BuildWithEmptyStringParam = `` /* 297-byte string literal not displayed */
BuildWithEmptyStringParam defines a param that with an empty string value
const BuildWithMultipleRefSecrets = `` /* 395-byte string literal not displayed */
BuildWithMultipleRefSecrets defines a Build with multiple referenced secrets under spec
const BuildWithOutputRefSecret = `` /* 311-byte string literal not displayed */
BuildWithOutputRefSecret defines a Build with a referenced secret under spec.output
const BuildWithRestrictedParam = `` /* 339-byte string literal not displayed */
BuildWithRestrictedParam defines a Build using params that are reserved only for shipwright
const BuildWithSleepTimeParam = `` /* 299-byte string literal not displayed */
BuildWithSleepTimeParam defines a Build with a parameter
const BuildWithSleepTimeParamAndCBS = `` /* 306-byte string literal not displayed */
BuildWithSleepTimeParamAndCBS defines a Build with a parameter
const BuildWithSourceRefSecret = `` /* 311-byte string literal not displayed */
BuildWithSourceRefSecret defines a Build with a referenced secret under spec.source
const BuildWithUndefinedParam = `` /* 298-byte string literal not displayed */
BuildWithUndefinedParameter defines a param that was not declared under the strategy parameters
const BuildWithUndefinedParamAndCBS = `` /* 305-byte string literal not displayed */
BuildWithUndefinedParamAndCBS defines a param that was not declared under the strategy parameters of a ClusterBuildStrategy
const BuildahBuildRunWithOutputImageLabelsAndAnnotations = `` /* 420-byte string literal not displayed */
BuildahBuildRunWithOutputImageLabelsAndAnnotations defines a BuildRun with a output image labels and annotation
const BuildahBuildRunWithSA = `` /* 198-byte string literal not displayed */
BuildahBuildRunWithSA defines a BuildRun with a service-account
const BuildahBuildRunWithSAAndOutput = `` /* 294-byte string literal not displayed */
BuildahBuildRunWithSAAndOutput defines a BuildRun with a service-account and output overrides
const BuildahBuildRunWithTimeOutAndSA = `` /* 212-byte string literal not displayed */
BuildahBuildRunWithTimeOutAndSA defines a BuildRun with a service-account and timeout
const BuildahBuildStrategySingleStep = `` /* 1139-byte string literal not displayed */
BuildahBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources
const BuildahBuildWithAnnotationAndLabel = `` /* 462-byte string literal not displayed */
BuildahBuildWithAnnotationAndLabel defines a simple Build with a source, strategy, output, annotations and labels
const BuildahBuildWithMultipleAnnotationAndLabel = `` /* 578-byte string literal not displayed */
BuildahBuildWithMultipleAnnotationAndLabel defines a Build with a source, strategy, output, multiple annotations and labels
const BuildahBuildWithOutput = `` /* 291-byte string literal not displayed */
BuildahBuildWithOutput defines a simple Build with a source, strategy and output
const BuildahBuildWithTimeOut = `` /* 306-byte string literal not displayed */
BuildahBuildWithTimeOut defines a Build for Buildah with source, strategy, output and timeout
const BuildpacksBuildRunWithSA = `` /* 230-byte string literal not displayed */
BuildpacksBuildRunWithSA defines a BuildRun with a service-account
const BuildpacksBuildStrategySingleStep = `` /* 723-byte string literal not displayed */
BuildpacksBuildStrategySingleStep defines a BuildStrategy for Buildpacks with a single step and container resources
const BuildpacksBuildWithBuilderAndTimeOut = `` /* 443-byte string literal not displayed */
BuildpacksBuildWithBuilderAndTimeOut defines a Build with source, strategy, builder, output and timeout
const ClusterBuildStrategyNoOp = `` /* 830-byte string literal not displayed */
ClusterBuildStrategyNoOp is a strategy that does nothing and has no dependencies
const ClusterBuildStrategySingleStep = `` /* 1584-byte string literal not displayed */
ClusterBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources
const ClusterBuildStrategySingleStepKaniko = `` /* 1084-byte string literal not displayed */
ClusterBuildStrategySingleStepKaniko is a cluster build strategy based on Kaniko, which is very close to the actual Kaniko build strategy example in the project
const ClusterBuildStrategySingleStepKanikoError = `` /* 1087-byte string literal not displayed */
ClusterBuildStrategySingleStepKanikoError is a Kaniko based cluster build strategy that has a configuration error (misspelled command flag) so that it will fail in Tekton
const ClusterBuildStrategySleep30s = `` /* 317-byte string literal not displayed */
ClusterBuildStrategySleep30s is a strategy that does only sleep 30 seconds
const ClusterBuildStrategyWithAnnotations = `` /* 1256-byte string literal not displayed */
ClusterBuildStrategyWithAnnotations is a cluster build strategy that contains annotations
const ClusterBuildStrategyWithParameters = `` /* 322-byte string literal not displayed */
ClusterBuildStrategyWithParameters is a strategy that uses a sleep command with a value for its spec.parameters
const MinimalBuildRun = `
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
spec:
buildRef:
name: foobar
`
MinimalBuildRun defines a minimal BuildRun with a reference to a not existing Build
const MinimalBuildRunRetention = `` /* 139-byte string literal not displayed */
MinimalBuildRunRetention defines a minimal BuildRun with a reference used to test retention fields
const MinimalBuildRunRetentionTTLFive = `` /* 201-byte string literal not displayed */
MinimalBuildRunRetention defines a minimal BuildRun with a reference used to test retention fields
const MinimalBuildRunWithOutput = `` /* 127-byte string literal not displayed */
MinimalBuildRunWithOutput defines a BuildRun with an override for the Build Output
const MinimalBuildRunWithParams = `` /* 138-byte string literal not displayed */
MinimalBuildRunWithParams defines a param override
const MinimalBuildRunWithReservedParams = `` /* 142-byte string literal not displayed */
const MinimalBuildRunWithSAGeneration = `
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
spec:
serviceAccount:
generate: true
buildRef:
name: foobar
`
MinimalBuildRunWithSAGeneration defines a minimal BuildRun with a reference to a not existing Build
const MinimalBuildRunWithSpecifiedServiceAccount = `
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
spec:
buildRef:
name: buildah
serviceAccount:
name: foobar
`
MinimalBuildRunWithSpecifiedServiceAccount defines a minimal BuildRun with a reference to a not existing serviceAccount
const MinimalBuildRunWithTimeOut = `
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
spec:
timeout: 1s
buildRef:
name: foobar
`
MinimalBuildRunWithTimeOut defines a BuildRun with an override for the Build Timeout
const MinimalBuildWithRetentionLimitDiff = `` /* 377-byte string literal not displayed */
MinimalBuildWithRetentionLimitDiff defines a simple Build with a source, a strategy and different failed and succeeded limits
const MinimalBuildWithRetentionLimitOne = `` /* 377-byte string literal not displayed */
MinimalBuildWithRetentionLimitOne defines a simple Build with a source, a strategy and limits set as 1
const MinimalBuildWithRetentionTTLFive = `` /* 383-byte string literal not displayed */
MinimalBuildWithRetentionTTLFive defines a simple Build with a source, a strategy and ttl
const MinimalBuildWithRetentionTTLOneMin = `` /* 383-byte string literal not displayed */
MinimalBuildWithRetentionTTL defines a simple Build with a source, a strategy ttl
const MinimalBuildahBuild = `` /* 230-byte string literal not displayed */
MinimalBuildahBuild defines a simple Build with a source and a strategy
const MinimalBuildahBuildRun = `
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
metadata:
name: buildah-run
spec:
buildRef:
name: buildah
`
MinimalBuildahBuildRun defines a simple BuildRun with a referenced Build
const MinimalBuildahBuildRunWithEnvVars = `` /* 276-byte string literal not displayed */
MinimalBuildahBuildRunWithEnvVars defines a simple BuildRun with a referenced Build and env vars
const MinimalBuildahBuildRunWithExitCode = `` /* 173-byte string literal not displayed */
const MinimalBuildahBuildStrategy = `` /* 1295-byte string literal not displayed */
MinimalBuildahBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources
const MinimalBuildahBuildStrategyWithEnvs = `` /* 1747-byte string literal not displayed */
MinimalBuildahBuildStrategyWithEnvs defines a BuildStrategy for Buildah with two steps each of them with different container resources and env vars
const MinimalBuildahBuildWithEnvVars = `` /* 386-byte string literal not displayed */
MinimalBuildahBuildWithEnvVars defines a simple Build with a source, strategy, and env vars
const MinimalBuildahClusterBuildStrategy = `` /* 1577-byte string literal not displayed */
MinimalBuildahClusterBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources
const MinimalOneOffBuildRun = `` /* 371-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct{}
Catalog allows you to access helper functions
func (*Catalog) BuildRunWithBuildSnapshot ¶
BuildRunWithBuildSnapshot returns BuildRun Object with a populated BuildSpec in the Status field
func (*Catalog) BuildRunWithExistingOwnerReferences ¶
func (c *Catalog) BuildRunWithExistingOwnerReferences(buildRunName string, buildName string, ownerName string) *build.BuildRun
BuildRunWithExistingOwnerReferences returns a BuildRun object that is already owned by some fake object
func (*Catalog) BuildRunWithFakeNamespace ¶
BuildRunWithFakeNamespace returns a BuildRun object with a namespace that does not exist
func (*Catalog) BuildRunWithSA ¶
func (c *Catalog) BuildRunWithSA(buildRunName string, buildName string, saName string) *build.BuildRun
BuildRunWithSA returns a customized BuildRun object that defines a service account
func (*Catalog) BuildRunWithSAGenerate ¶
BuildRunWithSAGenerate returns a customized BuildRun object that defines a service account
func (*Catalog) BuildRunWithSucceededCondition ¶
BuildRunWithSucceededCondition returns a BuildRun with a single condition of the type Succeeded
func (*Catalog) BuildRunWithoutSA ¶
BuildRunWithoutSA returns a buildrun without serviceAccountName and generate serviceAccount is false
func (*Catalog) BuildWithBuildRunDeletions ¶
func (c *Catalog) BuildWithBuildRunDeletions(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
BuildWithBuildRunDeletions returns a minimal Build object with the build.shipwright.io/build-run-deletion annotation set to true
func (*Catalog) BuildWithBuildRunDeletionsAndFakeNS ¶
func (c *Catalog) BuildWithBuildRunDeletionsAndFakeNS(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
BuildWithBuildRunDeletionsAndFakeNS returns a minimal Build object with the build.shipwright.io/build-run-deletion annotation set to true in a fake namespace
func (*Catalog) BuildWithBuildStrategy ¶
BuildWithBuildStrategy gives you an specific Build CRD
func (*Catalog) BuildWithClusterBuildStrategy ¶
func (c *Catalog) BuildWithClusterBuildStrategy(name string, ns string, strategyName string, secretName string) *build.Build
BuildWithClusterBuildStrategy gives you an specific Build CRD
func (*Catalog) BuildWithClusterBuildStrategyAndFalseSourceAnnotation ¶
func (c *Catalog) BuildWithClusterBuildStrategyAndFalseSourceAnnotation(name string, ns string, strategyName string) *build.Build
BuildWithClusterBuildStrategyAndFalseSourceAnnotation gives you an specific Build CRD
func (*Catalog) BuildWithClusterBuildStrategyAndSourceSecret ¶
func (c *Catalog) BuildWithClusterBuildStrategyAndSourceSecret(name string, ns string, strategyName string) *build.Build
BuildWithClusterBuildStrategyAndSourceSecret gives you an specific Build CRD
func (*Catalog) BuildWithNilBuildStrategyKind ¶
func (c *Catalog) BuildWithNilBuildStrategyKind(name string, ns string, strategyName string) *build.Build
BuildWithNilBuildStrategyKind gives you an Build CRD with nil build strategy kind
func (*Catalog) BuildWithOutputSecret ¶
BuildWithOutputSecret ....
func (*Catalog) BuildWithoutStrategyKind ¶
BuildWithoutStrategyKind returns a minimal Build object without an strategy kind definition
func (*Catalog) ClusterBuildStrategy ¶
func (c *Catalog) ClusterBuildStrategy(name string) *build.ClusterBuildStrategy
ClusterBuildStrategy to support tests
func (*Catalog) ConfigMapWithData ¶
func (c *Catalog) ConfigMapWithData(name string, ns string, data map[string]string) *corev1.ConfigMap
ConfigMapWithData creates a ConfigMap with data
func (*Catalog) DefaultBuild ¶
func (c *Catalog) DefaultBuild(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
DefaultBuild returns a minimal Build object
func (*Catalog) DefaultBuildRun ¶
DefaultBuildRun returns a minimal BuildRun object
func (*Catalog) DefaultBuildWithFalseRegistered ¶
func (c *Catalog) DefaultBuildWithFalseRegistered(buildName string, strategyName string, strategyKind build.BuildStrategyKind) *build.Build
DefaultBuildWithFalseRegistered returns a minimal Build object with a FALSE Registered
func (*Catalog) DefaultClusterBuildStrategy ¶
func (c *Catalog) DefaultClusterBuildStrategy() *build.ClusterBuildStrategy
DefaultClusterBuildStrategy returns a minimal ClusterBuildStrategy object with a inmutable name
func (*Catalog) DefaultNamespacedBuildStrategy ¶
func (c *Catalog) DefaultNamespacedBuildStrategy() *build.BuildStrategy
DefaultNamespacedBuildStrategy returns a minimal BuildStrategy object with a inmutable name
func (*Catalog) DefaultServiceAccount ¶
func (c *Catalog) DefaultServiceAccount(name string) *corev1.ServiceAccount
DefaultServiceAccount returns a minimal SA object
func (*Catalog) DefaultTaskRun ¶
func (c *Catalog) DefaultTaskRun(taskRunName string, ns string) *pipelineapi.TaskRun
DefaultTaskRun returns a minimal TaskRun object
func (*Catalog) DefaultTaskRunWithFalseStatus ¶
func (c *Catalog) DefaultTaskRunWithFalseStatus(trName string, buildRunName string, ns string) *pipelineapi.TaskRun
DefaultTaskRunWithFalseStatus returns a minimal tektont TaskRun with a FALSE status
func (*Catalog) DefaultTaskRunWithStatus ¶
func (c *Catalog) DefaultTaskRunWithStatus(trName string, buildRunName string, ns string, status corev1.ConditionStatus, reason string) *pipelineapi.TaskRun
DefaultTaskRunWithStatus returns a minimal tekton TaskRun with an Status
func (*Catalog) FakeClusterBuildStrategyNotFound ¶
FakeClusterBuildStrategyNotFound returns a not found error
func (*Catalog) LoadBRWithNameAndRef ¶
func (c *Catalog) LoadBRWithNameAndRef(name string, buildName string, d []byte) (*build.BuildRun, error)
LoadBRWithNameAndRef returns a populated BuildRun with a name and a referenced Build
func (*Catalog) LoadBuildRunFromBytes ¶
LoadBuildRunFromBytes returns a populated BuildRun
func (*Catalog) LoadBuildStrategyFromBytes ¶
func (c *Catalog) LoadBuildStrategyFromBytes(d []byte) (*build.BuildStrategy, error)
LoadBuildStrategyFromBytes returns a populated BuildStrategy
func (*Catalog) LoadBuildWithNameAndStrategy ¶
func (c *Catalog) LoadBuildWithNameAndStrategy(name string, strategy string, d []byte) (*build.Build, error)
LoadBuildWithNameAndStrategy returns a populated Build with name and a referenced strategy
func (*Catalog) LoadBuildYAML ¶
LoadBuildYAML parses YAML bytes into JSON and from JSON into a Build struct
func (*Catalog) LoadCBSWithName ¶
LoadCBSWithName returns a populated ClusterBuildStrategy with a name
func (*Catalog) LoadCustomResources ¶
func (c *Catalog) LoadCustomResources(cpu string, mem string) corev1.ResourceRequirements
LoadCustomResources returns a container set of resources based on cpu and memory
func (*Catalog) LoadStandAloneBuildRunWithNameAndStrategy ¶
func (*Catalog) PodWithInitContainerStatus ¶
PodWithInitContainerStatus returns a pod with a single entry under the Status field for InitContainer Status
func (*Catalog) SecretWithAnnotation ¶
SecretWithAnnotation gives you a secret with build annotation
func (*Catalog) SecretWithDockerConfigJson ¶
func (c *Catalog) SecretWithDockerConfigJson(name string, ns string, host string, username string, password string) *corev1.Secret
SecretWithDockerConfigJson creates a secret of type dockerconfigjson
func (*Catalog) SecretWithStringData ¶
func (c *Catalog) SecretWithStringData(name string, ns string, stringData map[string]string) *corev1.Secret
SecretWithStringData creates a Secret with stringData (not base64 encoded)
func (*Catalog) SecretWithoutAnnotation ¶
SecretWithoutAnnotation gives you a secret without build annotation
func (*Catalog) ServiceAccountWithControllerRef ¶
func (c *Catalog) ServiceAccountWithControllerRef(name string) *corev1.ServiceAccount
ServiceAccountWithControllerRef ... TODO
func (*Catalog) StubBuildAndTaskRun ¶
func (c *Catalog) StubBuildAndTaskRun( b *build.Build, tr *pipelineapi.TaskRun, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildAndTaskRun is used to simulate the existence of a Build and a TaskRun when there is a client GET on this two objects
func (*Catalog) StubBuildCRDs ¶
func (c *Catalog) StubBuildCRDs( b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, cb *build.ClusterBuildStrategy, bs *build.BuildStrategy, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
func (*Catalog) StubBuildCRDsPodAndTaskRun ¶
func (c *Catalog) StubBuildCRDsPodAndTaskRun( b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, cb *build.ClusterBuildStrategy, bs *build.BuildStrategy, tr *pipelineapi.TaskRun, pod *corev1.Pod, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildCRDsPodAndTaskRun stubs different objects in case a client GET call is executed against them
func (*Catalog) StubBuildRun ¶
func (c *Catalog) StubBuildRun( b *build.BuildRun, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildRun is used to simulate the existence of a BuildRun only when there is a client GET on this object type
func (*Catalog) StubBuildRunAndTaskRun ¶
func (c *Catalog) StubBuildRunAndTaskRun( b *build.BuildRun, tr *pipelineapi.TaskRun, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildRunAndTaskRun is used to simulate the existence of a BuildRun and a TaskRun when there is a client GET on this two objects
func (*Catalog) StubBuildRunGetWithSA ¶
func (c *Catalog) StubBuildRunGetWithSA( b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildRunGetWithSA returns fake object for different client calls
func (*Catalog) StubBuildRunGetWithSAandStrategies ¶
func (c *Catalog) StubBuildRunGetWithSAandStrategies( b *build.Build, br *build.BuildRun, sa *corev1.ServiceAccount, cb *build.ClusterBuildStrategy, bs *build.BuildStrategy, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildRunGetWithSAandStrategies simulates the output of client GET calls for the BuildRun unit tests
func (*Catalog) StubBuildRunGetWithTaskRunAndSA ¶
func (c *Catalog) StubBuildRunGetWithTaskRunAndSA( b *build.Build, br *build.BuildRun, tr *pipelineapi.TaskRun, sa *corev1.ServiceAccount, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildRunGetWithTaskRunAndSA returns fake object for different client calls
func (*Catalog) StubBuildRunGetWithoutSA ¶
func (c *Catalog) StubBuildRunGetWithoutSA( b *build.Build, br *build.BuildRun, ) func(context context.Context, nn types.NamespacedName, object client.Object, getOptions ...client.GetOption) error
StubBuildRunGetWithoutSA simulates the output of client GET calls for the BuildRun unit tests
func (*Catalog) StubBuildRunLabel ¶
func (c *Catalog) StubBuildRunLabel(buildSample *build.Build) func(context context.Context, object client.Object, _ ...client.UpdateOption) error
StubBuildRunLabel asserts Label fields on a BuildRun resource
func (*Catalog) StubBuildRunStatus ¶
func (c *Catalog) StubBuildRunStatus(reason string, name *string, condition build.Condition, status corev1.ConditionStatus, buildSpec build.BuildSpec, tolerateEmptyStatus bool) func(context context.Context, object client.Object, _ ...client.SubResourceUpdateOption) error
StubBuildRunStatus asserts Status fields on a BuildRun resource
func (*Catalog) StubBuildStatusReason ¶
func (c *Catalog) StubBuildStatusReason(reason build.BuildReason, message string) func(context context.Context, object client.Object, _ ...client.SubResourceUpdateOption) error
StubBuildStatusReason asserts Status fields on a Build resource
func (*Catalog) StubBuildUpdateOwnerReferences ¶
func (c *Catalog) StubBuildUpdateOwnerReferences(ownerKind string, ownerName string, isOwnerController *bool, blockOwnerDeletion *bool) func(context context.Context, object client.Object, _ ...client.UpdateOption) error
StubBuildUpdateOwnerReferences simulates and assert an updated BuildRun object ownerreferences
func (*Catalog) StubFunc ¶
func (c *Catalog) StubFunc(status corev1.ConditionStatus, reason build.BuildReason, message string) func(context context.Context, object client.Object, _ ...client.SubResourceUpdateOption) error
StubFunc is used to simulate the status of the Build after a .Status().Update() call in the controller. This receives a parameter to return an specific status state
func (*Catalog) TaskRunWithCompletionAndStartTime ¶
func (c *Catalog) TaskRunWithCompletionAndStartTime(trName string, buildRunName string, ns string) *pipelineapi.TaskRun
TaskRunWithCompletionAndStartTime provides a TaskRun object with a Completion and StartTime
func (*Catalog) TaskRunWithStatus ¶
func (c *Catalog) TaskRunWithStatus(trName string, ns string) *pipelineapi.TaskRun
TaskRunWithStatus returns a minimal tekton TaskRun with an Status