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 = `` /* 271-byte string literal not displayed */
BuildBSMinimal defines a Build with a BuildStrategy
const BuildBSMinimalNoSource = `` /* 182-byte string literal not displayed */
BuildBSMinimalNoSource defines a Build with a BuildStrategy without source
const BuildCBSMinimal = `` /* 307-byte string literal not displayed */
BuildCBSMinimal defines a Build with a ClusterBuildStrategy
const BuildCBSMinimalWithFakeSecret = `` /* 306-byte string literal not displayed */
BuildCBSMinimalWithFakeSecret defines a Build with a ClusterBuildStrategy and an not existing secret
const BuildCBSWithBuildRunDeletion = `` /* 317-byte string literal not displayed */
BuildCBSWithBuildRunDeletion defines a Build with a ClusterBuildStrategy and the annotation for automatic BuildRun deletion
const BuildCBSWithShortTimeOut = `` /* 292-byte string literal not displayed */
BuildCBSWithShortTimeOut defines a Build with a ClusterBuildStrategy and a short timeout
const BuildCBSWithShortTimeOutAndRefOutputSecret = `` /* 321-byte string literal not displayed */
BuildCBSWithShortTimeOutAndRefOutputSecret defines a Build with a ClusterBuildStrategy, a short timeout and an output secret
const BuildCBSWithVerifyRepositoryAnnotation = `` /* 260-byte string literal not displayed */
BuildCBSWithVerifyRepositoryAnnotation defines a Build with the verify repository annotation key
const BuildCBSWithWrongURL = `` /* 349-byte string literal not displayed */
BuildCBSWithWrongURL defines a Build with a ClusterBuildStrategy and a non-existing url
const BuildCBSWithoutVerifyRepositoryAnnotation = `` /* 189-byte string literal not displayed */
BuildCBSWithoutVerifyRepositoryAnnotation defines a minimal Build without source url and annotation
const BuildStrategyWithErrorResult = `` /* 402-byte string literal not displayed */
BuildStrategyWithErrorResult is a strategy that always fails and surfaces and error reason and message to the user
const BuildStrategyWithParameterVerification = `` /* 1582-byte string literal not displayed */
BuildStrategyWithParameterVerification is a strategy that verifies that parameters can be used at all expected places
const BuildStrategyWithParameters = `` /* 685-byte string literal not displayed */
BuildStrategyWithParameters is a strategy that uses a sleep command with a value for its spec.parameters
const BuildStrategyWithoutDefaultInParameter = `` /* 311-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 = `` /* 296-byte string literal not displayed */
BuildStrategyWithoutPush is a strategy that writes an image tarball and pushes nothing
const BuildWithArrayParam = `` /* 355-byte string literal not displayed */
BuildWithArrayParam defines a Build with an array parameter
const BuildWithBuilderRefSecret = `` /* 360-byte string literal not displayed */
BuildWithBuilderRefSecret defines a Build with a referenced secret under spec.builder
const BuildWithConfigMapSecretParams = `` /* 508-byte string literal not displayed */
BuildWithConfigMapSecretParams defines a Build with parameter values referencing a ConfigMap and Secret
const BuildWithDisableVulnerabilityScan = `` /* 233-byte string literal not displayed */
BuildWithVulnerabilityScanOptions defines a Build with vulnerability scan options
const BuildWithEmptyStringParam = `` /* 321-byte string literal not displayed */
BuildWithEmptyStringParam defines a param that with an empty string value
const BuildWithMultipleRefSecrets = `` /* 393-byte string literal not displayed */
BuildWithMultipleRefSecrets defines a Build with multiple referenced secrets under spec
const BuildWithOutputRefSecret = `` /* 322-byte string literal not displayed */
BuildWithOutputRefSecret defines a Build with a referenced secret under spec.output
const BuildWithRestrictedParam = `` /* 363-byte string literal not displayed */
BuildWithRestrictedParam defines a Build using params that are reserved only for shipwright
const BuildWithSleepTimeParam = `` /* 323-byte string literal not displayed */
BuildWithSleepTimeParam defines a Build with a parameter
const BuildWithSleepTimeParamAndCBS = `` /* 330-byte string literal not displayed */
BuildWithSleepTimeParamAndCBS defines a Build with a parameter
const BuildWithSourceRefSecret = `` /* 325-byte string literal not displayed */
BuildWithSourceRefSecret defines a Build with a referenced secret under spec.source
const BuildWithUndefinedParam = `` /* 322-byte string literal not displayed */
BuildWithUndefinedParameter defines a param that was not declared under the strategy parameters
const BuildWithUndefinedParamAndCBS = `` /* 329-byte string literal not displayed */
BuildWithUndefinedParamAndCBS defines a param that was not declared under the strategy parameters of a ClusterBuildStrategy
const BuildWithVulnerabilityScanOptions = `` /* 258-byte string literal not displayed */
BuildWithVulnerabilityScanOptions defines a Build with vulnerability scan options
const BuildahBuildRunWithOutputImageLabelsAndAnnotations = `` /* 406-byte string literal not displayed */
BuildahBuildRunWithOutputImageLabelsAndAnnotations defines a BuildRun with a output image labels and annotation
const BuildahBuildRunWithSA = `` /* 184-byte string literal not displayed */
BuildahBuildRunWithSA defines a BuildRun with a service-account
const BuildahBuildRunWithSAAndOutput = `` /* 280-byte string literal not displayed */
BuildahBuildRunWithSAAndOutput defines a BuildRun with a service-account and output overrides
const BuildahBuildRunWithTimeOutAndSA = `` /* 198-byte string literal not displayed */
BuildahBuildRunWithTimeOutAndSA defines a BuildRun with a service-account and timeout
const BuildahBuildStrategySingleStep = `` /* 1091-byte string literal not displayed */
BuildahBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources
const BuildahBuildWithAnnotationAndLabel = `` /* 519-byte string literal not displayed */
BuildahBuildWithAnnotationAndLabel defines a simple Build with a source, strategy, output, annotations and labels
const BuildahBuildWithMultipleAnnotationAndLabel = `` /* 635-byte string literal not displayed */
BuildahBuildWithMultipleAnnotationAndLabel defines a Build with a source, strategy, output, multiple annotations and labels
const BuildahBuildWithOutput = `` /* 315-byte string literal not displayed */
BuildahBuildWithOutput defines a simple Build with a source, strategy and output
const BuildahBuildWithTimeOut = `` /* 330-byte string literal not displayed */
BuildahBuildWithTimeOut defines a Build for Buildah with source, strategy, output and timeout
const BuildpacksBuildRunWithSA = `` /* 196-byte string literal not displayed */
BuildpacksBuildRunWithSA defines a BuildRun with a service-account
const BuildpacksBuildStrategySingleStep = `` /* 718-byte string literal not displayed */
BuildpacksBuildStrategySingleStep defines a BuildStrategy for Buildpacks with a single step and container resources
const BuildpacksBuildWithBuilderAndTimeOut = `` /* 402-byte string literal not displayed */
BuildpacksBuildWithBuilderAndTimeOut defines a Build with source, strategy, builder, output and timeout
const ClusterBuildStrategyForVulnerabilityScanning = `` /* 701-byte string literal not displayed */
ClusterBuildStrategyForVulnerabilityScanning is a strategy that does nothing and has no dependencies
const ClusterBuildStrategyNoOp = `` /* 824-byte string literal not displayed */
ClusterBuildStrategyNoOp is a strategy that does nothing and has no dependencies
const ClusterBuildStrategySingleStep = `` /* 1270-byte string literal not displayed */
ClusterBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources
const ClusterBuildStrategySingleStepKaniko = `` /* 1078-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 = `` /* 1081-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 = `` /* 311-byte string literal not displayed */
ClusterBuildStrategySleep30s is a strategy that does only sleep 30 seconds
const ClusterBuildStrategyWithAnnotations = `` /* 1250-byte string literal not displayed */
ClusterBuildStrategyWithAnnotations is a cluster build strategy that contains annotations
const ClusterBuildStrategyWithParameters = `` /* 316-byte string literal not displayed */
ClusterBuildStrategyWithParameters is a strategy that uses a sleep command with a value for its spec.parameters
const MinimalBuild = `` /* 189-byte string literal not displayed */
MinimalBuild defines a simple Build with a strategy output
const MinimalBuildRun = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
build:
name: foobar
`
MinimalBuildRun defines a minimal BuildRun with a reference to a not existing Build
const MinimalBuildRunRetention = `` /* 135-byte string literal not displayed */
MinimalBuildRunRetention defines a minimal BuildRun with a reference used to test retention fields
const MinimalBuildRunRetentionTTLFive = `` /* 197-byte string literal not displayed */
MinimalBuildRunRetention defines a minimal BuildRun with a reference used to test retention fields
const MinimalBuildRunWithNodeSelector = `` /* 128-byte string literal not displayed */
MinimalBuildRunWithNodeSelector defines a minimal BuildRun with a reference to a not existing Build, and a nodeSelector
const MinimalBuildRunWithOutput = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
output:
image: foobar.registry.com
build:
name: foobar
`
MinimalBuildRunWithOutput defines a BuildRun with an override for the Build Output
const MinimalBuildRunWithParams = `` /* 134-byte string literal not displayed */
MinimalBuildRunWithParams defines a param override
const MinimalBuildRunWithReservedParams = `` /* 138-byte string literal not displayed */
const MinimalBuildRunWithSAGeneration = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
serviceAccount: ".generate"
build:
name: foobar
`
MinimalBuildRunWithSAGeneration defines a minimal BuildRun with a reference to a not existing Build
const MinimalBuildRunWithSpecifiedServiceAccount = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
build:
name: buildah
serviceAccount: foobar
`
MinimalBuildRunWithSpecifiedServiceAccount defines a minimal BuildRun with a reference to a not existing serviceAccount
const MinimalBuildRunWithTimeOut = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
spec:
timeout: 1s
build:
name: foobar
`
MinimalBuildRunWithTimeOut defines a BuildRun with an override for the Build Timeout
const MinimalBuildRunWithVulnerabilityScan = `` /* 244-byte string literal not displayed */
MinimalBuildRunWithVulnerabilityScan defines a BuildRun with an override for the Build Output
const MinimalBuildWithNodeSelector = `` /* 235-byte string literal not displayed */
MinimalBuildWithNodeSelector defines a simple Build with a strategy, output, and NodeSelector
const MinimalBuildWithRetentionLimitDiff = `` /* 401-byte string literal not displayed */
MinimalBuildWithRetentionLimitDiff defines a simple Build with a source, a strategy and different failed and succeeded limits
const MinimalBuildWithRetentionLimitOne = `` /* 401-byte string literal not displayed */
MinimalBuildWithRetentionLimitOne defines a simple Build with a source, a strategy and limits set as 1
const MinimalBuildWithRetentionTTLFive = `` /* 407-byte string literal not displayed */
MinimalBuildWithRetentionTTLFive defines a simple Build with a source, a strategy and ttl
const MinimalBuildWithRetentionTTLOneMin = `` /* 407-byte string literal not displayed */
MinimalBuildWithRetentionTTL defines a simple Build with a source, a strategy ttl
const MinimalBuildahBuild = `` /* 287-byte string literal not displayed */
MinimalBuildahBuild defines a simple Build with a source and a strategy
const MinimalBuildahBuildRun = `
apiVersion: shipwright.io/v1beta1
kind: BuildRun
metadata:
name: buildah-run
spec:
build:
name: buildah
`
MinimalBuildahBuildRun defines a simple BuildRun with a referenced Build
const MinimalBuildahBuildRunWithEnvVars = `` /* 272-byte string literal not displayed */
MinimalBuildahBuildRunWithEnvVars defines a simple BuildRun with a referenced Build and env vars
const MinimalBuildahBuildRunWithExitCode = `` /* 169-byte string literal not displayed */
const MinimalBuildahBuildRunWithNodeSelector = `` /* 159-byte string literal not displayed */
MinimalBuildahBuildRunWithNodeSelector defines a simple BuildRun with a referenced Build and nodeSelector
const MinimalBuildahBuildStrategy = `` /* 1407-byte string literal not displayed */
MinimalBuildahBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources
const MinimalBuildahBuildStrategyWithEnvs = `` /* 1433-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 = `` /* 443-byte string literal not displayed */
MinimalBuildahBuildWithEnvVars defines a simple Build with a source, strategy, and env vars
const MinimalBuildahBuildWithNodeSelector = `` /* 275-byte string literal not displayed */
MinimalBuildahBuildWithNodeSelector defines a simple Build with a source, strategy, and nodeSelector
const MinimalBuildahClusterBuildStrategy = `` /* 1263-byte string literal not displayed */
MinimalBuildahClusterBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources
const MinimalOneOffBuildRun = `` /* 425-byte string literal not displayed */
const OneOffBuildRunWithVulnerabilityScan = `` /* 330-byte string literal not displayed */
MinimalBuildRunWithVulnerabilityScan defines a BuildRun with an override for the Build Output
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