syntax_helpers_test

package
v2.1.94 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerResourceLimits

func ContainerResourceLimits(cpus, memory string) builder.ContainerOp

ContainerResourceLimits sets the resource limits for container options

func ContainerResourceRequests

func ContainerResourceRequests(cpus, memory string) builder.ContainerOp

ContainerResourceRequests sets the resource requests for container options

func ContainerSecurityContext

func ContainerSecurityContext(privileged bool) builder.ContainerOp

ContainerSecurityContext sets the security context for container options

func ContainerVolumeMount

func ContainerVolumeMount(name string, mountPath string) builder.ContainerOp

ContainerVolumeMount adds a VolumeMount to the container options

func EnvVar

func EnvVar(name string, value string) builder.ContainerOp

EnvVar adds an environment variable with a value to the container options

func EnvVarFrom

func EnvVarFrom(name string, source *corev1.EnvVarSource) builder.ContainerOp

EnvVarFrom adds an environment variable using EnvVarSource to the container options

func OutputsResource

func OutputsResource(name string, resourceType v1alpha1.PipelineResourceType, ops ...builder.TaskResourceOp) builder.OutputsOp

OutputsResource adds a resource, with specified name and type, to the Outputs. Any number of TaskResource modifier can be passed to transform it.

func ParsedPipeline

func ParsedPipeline(ops ...PipelineOp) *syntax.ParsedPipeline

ParsedPipeline creates a ParsedPipeline from the provided operations

func PipelineStructure

func PipelineStructure(name string, ops ...PipelineStructureOp) *v1.PipelineStructure

PipelineStructure creates a PipelineStructure

func StepResourceLimits

func StepResourceLimits(cpus, memory string) builder.StepOp

StepResourceLimits sets the resource limits for container options on a step

func StepResourceRequests

func StepResourceRequests(cpus, memory string) builder.StepOp

StepResourceRequests sets the resource requests for container options on a step

func StepSecurityContext

func StepSecurityContext(privileged bool) builder.StepOp

StepSecurityContext sets the security context for container options on a step

func StepVolumeMount

func StepVolumeMount(name string, mountPath string) builder.StepOp

StepVolumeMount adds a VolumeMount to the container options on a step

func TaskStageLabel

func TaskStageLabel(value string) builder.TaskOp

TaskStageLabel sets the stage label on the task

Types

type LoopOp

type LoopOp func(*syntax.Loop)

LoopOp is an operation on a Loop

func LoopStep

func LoopStep(ops ...StepOp) LoopOp

LoopStep adds a step to the loop

type PipelineOp

type PipelineOp func(*syntax.ParsedPipeline)

PipelineOp is an operation on a ParsedPipeline

func PipelineAgent

func PipelineAgent(image string) PipelineOp

PipelineAgent sets the agent for the pipeline

func PipelineDir

func PipelineDir(dir string) PipelineOp

PipelineDir sets the default working directory for the pipeline

func PipelineEnvVar

func PipelineEnvVar(name, value string) PipelineOp

PipelineEnvVar add an environment variable, with specified name and value, to the pipeline.

func PipelineOptions

func PipelineOptions(ops ...PipelineOptionsOp) PipelineOp

PipelineOptions sets the RootOptions for the pipeline

func PipelinePost

func PipelinePost(condition syntax.PostCondition, ops ...PipelinePostOp) PipelineOp

PipelinePost adds a post condition to the pipeline

func PipelineStage

func PipelineStage(name string, ops ...StageOp) PipelineOp

PipelineStage adds a stage to the pipeline

type PipelineOptionsOp

type PipelineOptionsOp func(*syntax.RootOptions)

PipelineOptionsOp is an operation on RootOptions

func PipelineContainerOptions

func PipelineContainerOptions(ops ...builder.ContainerOp) PipelineOptionsOp

PipelineContainerOptions sets the containerOptions for the pipeline

func PipelineOptionsDistributeParallelAcrossNodes

func PipelineOptionsDistributeParallelAcrossNodes(b bool) PipelineOptionsOp

PipelineOptionsDistributeParallelAcrossNodes sets the value for distributeParallelAcrossNodes

func PipelineOptionsRetry

func PipelineOptionsRetry(count int8) PipelineOptionsOp

PipelineOptionsRetry sets the retry count for the pipeline

func PipelineOptionsTimeout

func PipelineOptionsTimeout(time int64, unit syntax.TimeoutUnit) PipelineOptionsOp

PipelineOptionsTimeout sets the timeout for the pipeline

func PipelinePodLabels

func PipelinePodLabels(labels map[string]string) PipelineOptionsOp

PipelinePodLabels sets the optional pod labels for the pipeline

func PipelineTolerations

func PipelineTolerations(tolerations []corev1.Toleration) PipelineOptionsOp

PipelineTolerations sets the tolerations for the pipeline

func PipelineVolume

func PipelineVolume(volume *corev1.Volume) PipelineOptionsOp

PipelineVolume adds a volume to the RootOptions for the pipeline

type PipelinePostOp

type PipelinePostOp func(*syntax.Post)

PipelinePostOp is an operation on Post

func PostAction

func PostAction(name string, options map[string]string) PipelinePostOp

PostAction adds a post action to a post condition

type PipelineStructureOp

type PipelineStructureOp func(structure *v1.PipelineStructure)

PipelineStructureOp is an operation used in generating a PipelineStructure

func StructurePipelineRunRef

func StructurePipelineRunRef(name string) PipelineStructureOp

StructurePipelineRunRef adds a run reference to the structure

func StructureStage

func StructureStage(name string, ops ...PipelineStructureStageOp) PipelineStructureOp

StructureStage adds a stage to the structure

type PipelineStructureStageOp

type PipelineStructureStageOp func(stage *v1.PipelineStructureStage)

PipelineStructureStageOp is an operation used in generating a PipelineStructureStage

func StructureStageDepth

func StructureStageDepth(depth int8) PipelineStructureStageOp

StructureStageDepth sets the depth on the stage

func StructureStageNext

func StructureStageNext(Next string) PipelineStructureStageOp

StructureStageNext sets the next stage for the stage

func StructureStageParallel

func StructureStageParallel(stages ...string) PipelineStructureStageOp

StructureStageParallel sets the nested parallel stages for the stage

func StructureStageParent

func StructureStageParent(parent string) PipelineStructureStageOp

StructureStageParent sets the parent stage for the stage

func StructureStagePrevious

func StructureStagePrevious(previous string) PipelineStructureStageOp

StructureStagePrevious sets the previous stage for the stage

func StructureStageStages

func StructureStageStages(stages ...string) PipelineStructureStageOp

StructureStageStages sets the nested sequential stages for the stage

func StructureStageTaskRef

func StructureStageTaskRef(name string) PipelineStructureStageOp

StructureStageTaskRef adds a task ref to the stage

func StructureStageTaskRunRef

func StructureStageTaskRunRef(name string) PipelineStructureStageOp

StructureStageTaskRunRef adds a task run ref to the stage

type StageOp

type StageOp func(*syntax.Stage)

StageOp is an operation on a Stage

func StageAgent

func StageAgent(image string) StageOp

StageAgent sets the image/agent for a stage

func StageDir

func StageDir(dir string) StageOp

StageDir sets the default working directory for the stage

func StageEnvVar

func StageEnvVar(name, value string) StageOp

StageEnvVar add an environment variable, with specified name and value, to the stage.

func StageOptions

func StageOptions(ops ...StageOptionsOp) StageOp

StageOptions sets the StageOptions for a stage

func StageParallel

func StageParallel(name string, ops ...StageOp) StageOp

StageParallel adds a nested parallel stage to the stage

func StagePost

func StagePost(condition syntax.PostCondition, ops ...PipelinePostOp) StageOp

StagePost adds a post condition to the stage

func StageSequential

func StageSequential(name string, ops ...StageOp) StageOp

StageSequential adds a nested sequential stage to the stage

func StageStep

func StageStep(ops ...StepOp) StageOp

StageStep adds a step to the stage

type StageOptionsOp

type StageOptionsOp func(*syntax.StageOptions)

StageOptionsOp is an operation on StageOptions

func StageContainerOptions

func StageContainerOptions(ops ...builder.ContainerOp) StageOptionsOp

StageContainerOptions sets the containerOptions for a stage

func StageOptionsRetry

func StageOptionsRetry(count int8) StageOptionsOp

StageOptionsRetry sets the retry count for a stage

func StageOptionsStash

func StageOptionsStash(name, files string) StageOptionsOp

StageOptionsStash adds a stash to the stage

func StageOptionsTimeout

func StageOptionsTimeout(time int64, unit syntax.TimeoutUnit) StageOptionsOp

StageOptionsTimeout sets the timeout for a stage

func StageOptionsUnstash

func StageOptionsUnstash(name, dir string) StageOptionsOp

StageOptionsUnstash adds an unstash to the stage

func StageOptionsWorkspace

func StageOptionsWorkspace(ws string) StageOptionsOp

StageOptionsWorkspace sets the workspace for a stage

func StageVolume

func StageVolume(volume *corev1.Volume) StageOptionsOp

StageVolume adds a volume to the StageOptions for the stage

type StepOp

type StepOp func(*syntax.Step)

StepOp is an operation on a step

func StepAgent

func StepAgent(image string) StepOp

StepAgent sets the agent for a step

func StepArg

func StepArg(arg string) StepOp

StepArg sets the arguments for a step

func StepCmd

func StepCmd(cmd string) StepOp

StepCmd sets the command for a step

func StepDir

func StepDir(dir string) StepOp

StepDir sets the working dir for a step

func StepEnvVar

func StepEnvVar(name, value string) StepOp

StepEnvVar add an environment variable, with specified name and value, to the step.

func StepImage

func StepImage(image string) StepOp

StepImage sets the image for a step

func StepLoop

func StepLoop(variable string, values []string, ops ...LoopOp) StepOp

StepLoop adds a loop to the step

func StepName

func StepName(name string) StepOp

StepName sets the name for a step

func StepOptions

func StepOptions(options map[string]string) StepOp

StepOptions sets the alias step options for a step

func StepStep

func StepStep(s string) StepOp

StepStep sets the alias step for a step

Jump to

Keyboard shortcuts

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