Documentation
¶
Index ¶
- Constants
- type Catalog
- 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) BuildRunWithoutSA(buildRunName string, buildName string) *build.BuildRun
- func (c *Catalog) BuildStrategyList(name string, ns string) *build.BuildStrategyList
- 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) BuildWithCustomAnnotationAndFinalizer(name string, ns string, strategyName string, a map[string]string, f []string) *build.Build
- func (c *Catalog) BuildWithNilBuildStrategyKind(name string, ns string, strategyName string) *build.Build
- func (c *Catalog) ClusterBuildStrategyList(name string) *build.ClusterBuildStrategyList
- 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) *v1beta1.TaskRun
- func (c *Catalog) DefaultTaskRunWithFalseStatus(trName string, buildRunName string, ns string) *v1beta1.TaskRun
- func (c *Catalog) DefaultTaskRunWithStatus(trName string, buildRunName string, ns string, status corev1.ConditionStatus, ...) *v1beta1.TaskRun
- func (c *Catalog) FakeBuildStrategyList() *build.BuildStrategyList
- func (c *Catalog) FakeClusterBuildStrategyList() *build.ClusterBuildStrategyList
- func (c *Catalog) FakeNoBuildStrategyList() *build.BuildStrategyList
- func (c *Catalog) FakeNoClusterBuildStrategyList() *build.ClusterBuildStrategyList
- func (c *Catalog) FakeNoSecretListInNamespace() corev1.SecretList
- func (c *Catalog) FakeSecretList() corev1.SecretList
- func (c *Catalog) LoadBuildRunYAML(d []byte) (*build.BuildRun, error)
- func (c *Catalog) LoadBuildStrategyYAML(d []byte) (*build.BuildStrategy, error)
- func (c *Catalog) LoadBuildYAML(d []byte) (*build.Build, error)
- func (c *Catalog) LoadCustomResources(cpu string, mem string) corev1.ResourceRequirements
- func (c *Catalog) SecretList(name string) corev1.SecretList
- func (c *Catalog) StubBuildAndTaskRun(b *build.Build, tr *v1beta1.TaskRun) ...
- func (c *Catalog) StubBuildRun(b *build.BuildRun) ...
- func (c *Catalog) StubBuildRunAndTaskRun(b *build.BuildRun, tr *v1beta1.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 *v1beta1.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, status corev1.ConditionStatus, ...) ...
- func (c *Catalog) StubBuildUpdateWithFinalizers(finalizer string) ...
- func (c *Catalog) StubBuildUpdateWithoutFinalizers() ...
- func (c *Catalog) StubFunc(status corev1.ConditionStatus, reason string) ...
Constants ¶
const BuildahBuildRunWithSA = `` /* 194-byte string literal not displayed */
BuildahBuildRunWithSA defines a BuildRun with a service-account
const BuildahBuildRunWithSAAndOutput = `` /* 290-byte string literal not displayed */
BuildahBuildRunWithSAAndOutput defines a BuildRun with a service-account and output overrides
const BuildahBuildRunWithTimeOutAndSA = `` /* 208-byte string literal not displayed */
BuildahBuildRunWithTimeOutAndSA defines a BuildRun with a service-account and timeout
const BuildahBuildStrategySingleStep = `` /* 639-byte string literal not displayed */
BuildahBuildStrategySingleStep defines a BuildStrategy for Buildah with a single step and container resources
const BuildahBuildWithOutput = `` /* 276-byte string literal not displayed */
BuildahBuildWithOutput defines a simple Build with a source, strategy and output
const BuildahBuildWithTimeOut = `` /* 291-byte string literal not displayed */
BuildahBuildWithTimeOut defines a Build for Buildah with source, strategy, output and timeout
const BuildpacksBuildRunWithSA = `` /* 226-byte string literal not displayed */
BuildpacksBuildRunWithSA defines a BuildRun with a service-account
const BuildpacksBuildStrategySingleStep = `` /* 641-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 MinimalBuildahBuild = `` /* 215-byte string literal not displayed */
MinimalBuildahBuild defines a simple Build with a source and a strategy
const MinimalBuildahBuildRun = `
apiVersion: build.dev/v1alpha1
kind: BuildRun
metadata:
name: buildah-run
spec:
buildRef:
name: buildah
`
MinimalBuildahBuildRun defines a simple BuildRun with a referenced Build
const MinimalBuildahBuildStrategy = `` /* 1166-byte string literal not displayed */
MinimalBuildahBuildStrategy defines a BuildStrategy for Buildah with two steps each of them with different container resources
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) 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) BuildRunWithoutSA ¶
BuildRunWithoutSA returns a buildrun without serviceAccountName and generate serviceAccount is false
func (*Catalog) BuildStrategyList ¶
func (c *Catalog) BuildStrategyList(name string, ns string) *build.BuildStrategyList
BuildStrategyList to support tests
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) BuildWithCustomAnnotationAndFinalizer ¶
func (c *Catalog) BuildWithCustomAnnotationAndFinalizer( name string, ns string, strategyName string, a map[string]string, f []string, ) *build.Build
BuildWithCustomAnnotationAndFinalizer provides a Build CRD with a customize annotation and optional finalizer
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) ClusterBuildStrategyList ¶
func (c *Catalog) ClusterBuildStrategyList(name string) *build.ClusterBuildStrategyList
ClusterBuildStrategyList to support tests
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 ¶
DefaultTaskRun returns a minimal TaskRun object
func (*Catalog) DefaultTaskRunWithFalseStatus ¶
func (c *Catalog) DefaultTaskRunWithFalseStatus(trName string, buildRunName string, ns string) *v1beta1.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) *v1beta1.TaskRun
DefaultTaskRunWithStatus returns a minimal tekton TaskRun with an Status
func (*Catalog) FakeBuildStrategyList ¶
func (c *Catalog) FakeBuildStrategyList() *build.BuildStrategyList
FakeBuildStrategyList to support tests
func (*Catalog) FakeClusterBuildStrategyList ¶
func (c *Catalog) FakeClusterBuildStrategyList() *build.ClusterBuildStrategyList
FakeClusterBuildStrategyList to support tests
func (*Catalog) FakeNoBuildStrategyList ¶
func (c *Catalog) FakeNoBuildStrategyList() *build.BuildStrategyList
FakeNoBuildStrategyList to support tests
func (*Catalog) FakeNoClusterBuildStrategyList ¶
func (c *Catalog) FakeNoClusterBuildStrategyList() *build.ClusterBuildStrategyList
FakeNoClusterBuildStrategyList to support tests
func (*Catalog) FakeNoSecretListInNamespace ¶
func (c *Catalog) FakeNoSecretListInNamespace() corev1.SecretList
FakeSecretListInNamespace to support test
func (*Catalog) FakeSecretList ¶
func (c *Catalog) FakeSecretList() corev1.SecretList
FakeSecretList to support tests
func (*Catalog) LoadBuildRunYAML ¶
LoadBuildRunYAML parses YAML bytes into JSON and from JSON into a BuildRun struct
func (*Catalog) LoadBuildStrategyYAML ¶
func (c *Catalog) LoadBuildStrategyYAML(d []byte) (*build.BuildStrategy, error)
LoadBuildStrategyYAML parses YAML bytes into JSON and from JSON into a BuildStrategy struct
func (*Catalog) LoadBuildYAML ¶
LoadBuildYAML parses YAML bytes into JSON and from JSON into a Build struct
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) SecretList ¶
func (c *Catalog) SecretList(name string) corev1.SecretList
SecretList to support tests
func (*Catalog) StubBuildAndTaskRun ¶
func (c *Catalog) StubBuildAndTaskRun( b *build.Build, tr *v1beta1.TaskRun, ) func(context context.Context, nn types.NamespacedName, object runtime.Object) error
StubBuildAndTaskRun is used to simulate the existance of a Build and a TaskRun when there is a client GET on this two objects
func (*Catalog) StubBuildRun ¶
func (c *Catalog) StubBuildRun( b *build.BuildRun, ) func(context context.Context, nn types.NamespacedName, object runtime.Object) error
StubBuildRunAndTaskRun is used to simulate the existance 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 *v1beta1.TaskRun, ) func(context context.Context, nn types.NamespacedName, object runtime.Object) error
StubBuildRunAndTaskRun is used to simulate the existance 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 runtime.Object) 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 runtime.Object) error
StubBuildRunGetWithSAandStrategies simulates the ouput of client GET calls for the BuildRun unit tests
func (*Catalog) StubBuildRunGetWithTaskRunAndSA ¶
func (c *Catalog) StubBuildRunGetWithTaskRunAndSA( b *build.Build, br *build.BuildRun, tr *v1beta1.TaskRun, sa *corev1.ServiceAccount, ) func(context context.Context, nn types.NamespacedName, object runtime.Object) 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 runtime.Object) 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 runtime.Object, _ ...crc.UpdateOption) error
StubBuildRunLabel asserts Label fields on a BuildRun resource
func (*Catalog) StubBuildRunStatus ¶
func (c *Catalog) StubBuildRunStatus(reason string, name *string, status corev1.ConditionStatus, buildSpec build.BuildSpec, tolerateEmptyStatus bool) func(context context.Context, object runtime.Object, _ ...crc.UpdateOption) error
StubBuildRunStatus asserts Status fields on a BuildRun resource
func (*Catalog) StubBuildUpdateWithFinalizers ¶
func (c *Catalog) StubBuildUpdateWithFinalizers(finalizer string) func(context context.Context, object runtime.Object, _ ...crc.UpdateOption) error
StubBuildUpdateWithFinalizers is used to simulate the state of the Build finalizers after a client Update on the Object happened.
func (*Catalog) StubBuildUpdateWithoutFinalizers ¶
func (c *Catalog) StubBuildUpdateWithoutFinalizers() func(context context.Context, object runtime.Object, _ ...crc.UpdateOption) error
StubBuildUpdateWithoutFinalizers is used to simulate the state of the Build finalizers after a client Update on the Object happened.
func (*Catalog) StubFunc ¶
func (c *Catalog) StubFunc(status corev1.ConditionStatus, reason string) func(context context.Context, object runtime.Object, _ ...crc.UpdateOption) 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