jx: github.com/jenkins-x/jx/pkg/tekton/syntax/syntax_helpers_test Index | Files

package syntax_helpers_test

import "github.com/jenkins-x/jx/pkg/tekton/syntax/syntax_helpers_test"


Package Files


func ContainerResourceLimits Uses

func ContainerResourceLimits(cpus, memory string) builder.ContainerOp

ContainerResourceLimits sets the resource limits for container options

func ContainerResourceRequests Uses

func ContainerResourceRequests(cpus, memory string) builder.ContainerOp

ContainerResourceRequests sets the resource requests for container options

func ContainerSecurityContext Uses

func ContainerSecurityContext(privileged bool) builder.ContainerOp

ContainerSecurityContext sets the security context for container options

func ContainerVolumeMount Uses

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

ContainerVolumeMount adds a VolumeMount to the container options

func EnvVar Uses

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

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

func EnvVarFrom Uses

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

EnvVarFrom adds an environment variable using EnvVarSource to the container options

func OutputsResource Uses

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 Uses

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

ParsedPipeline creates a ParsedPipeline from the provided operations

func PipelineStructure Uses

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

PipelineStructure creates a PipelineStructure

func StepResourceLimits Uses

func StepResourceLimits(cpus, memory string) builder.StepOp

StepResourceLimits sets the resource limits for container options on a step

func StepResourceRequests Uses

func StepResourceRequests(cpus, memory string) builder.StepOp

StepResourceRequests sets the resource requests for container options on a step

func StepSecurityContext Uses

func StepSecurityContext(privileged bool) builder.StepOp

StepSecurityContext sets the security context for container options on a step

func StepVolumeMount Uses

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

StepVolumeMount adds a VolumeMount to the container options on a step

func TaskStageLabel Uses

func TaskStageLabel(value string) builder.TaskOp

TaskStageLabel sets the stage label on the task

type LoopOp Uses

type LoopOp func(*syntax.Loop)

LoopOp is an operation on a Loop

func LoopStep Uses

func LoopStep(ops ...StepOp) LoopOp

LoopStep adds a step to the loop

type PipelineOp Uses

type PipelineOp func(*syntax.ParsedPipeline)

PipelineOp is an operation on a ParsedPipeline

func PipelineAgent Uses

func PipelineAgent(image string) PipelineOp

PipelineAgent sets the agent for the pipeline

func PipelineDir Uses

func PipelineDir(dir string) PipelineOp

PipelineDir sets the default working directory for the pipeline

func PipelineEnvVar Uses

func PipelineEnvVar(name, value string) PipelineOp

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

func PipelineOptions Uses

func PipelineOptions(ops ...PipelineOptionsOp) PipelineOp

PipelineOptions sets the RootOptions for the pipeline

func PipelinePost Uses

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

PipelinePost adds a post condition to the pipeline

func PipelineStage Uses

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

PipelineStage adds a stage to the pipeline

type PipelineOptionsOp Uses

type PipelineOptionsOp func(*syntax.RootOptions)

PipelineOptionsOp is an operation on RootOptions

func PipelineContainerOptions Uses

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

PipelineContainerOptions sets the containerOptions for the pipeline

func PipelineOptionsDistributeParallelAcrossNodes Uses

func PipelineOptionsDistributeParallelAcrossNodes(b bool) PipelineOptionsOp

PipelineOptionsDistributeParallelAcrossNodes sets the value for distributeParallelAcrossNodes

func PipelineOptionsRetry Uses

func PipelineOptionsRetry(count int8) PipelineOptionsOp

PipelineOptionsRetry sets the retry count for the pipeline

func PipelineOptionsTimeout Uses

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

PipelineOptionsTimeout sets the timeout for the pipeline

func PipelinePodLabels Uses

func PipelinePodLabels(labels map[string]string) PipelineOptionsOp

PipelinePodLabels sets the optional pod labels for the pipeline

func PipelineTolerations Uses

func PipelineTolerations(tolerations []corev1.Toleration) PipelineOptionsOp

PipelineTolerations sets the tolerations for the pipeline

func PipelineVolume Uses

func PipelineVolume(volume *corev1.Volume) PipelineOptionsOp

PipelineVolume adds a volume to the RootOptions for the pipeline

type PipelinePostOp Uses

type PipelinePostOp func(*syntax.Post)

PipelinePostOp is an operation on Post

func PostAction Uses

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

PostAction adds a post action to a post condition

type PipelineStructureOp Uses

type PipelineStructureOp func(structure *v1.PipelineStructure)

PipelineStructureOp is an operation used in generating a PipelineStructure

func StructurePipelineRunRef Uses

func StructurePipelineRunRef(name string) PipelineStructureOp

StructurePipelineRunRef adds a run reference to the structure

func StructureStage Uses

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

StructureStage adds a stage to the structure

type PipelineStructureStageOp Uses

type PipelineStructureStageOp func(stage *v1.PipelineStructureStage)

PipelineStructureStageOp is an operation used in generating a PipelineStructureStage

func StructureStageDepth Uses

func StructureStageDepth(depth int8) PipelineStructureStageOp

StructureStageDepth sets the depth on the stage

func StructureStageNext Uses

func StructureStageNext(Next string) PipelineStructureStageOp

StructureStageNext sets the next stage for the stage

func StructureStageParallel Uses

func StructureStageParallel(stages ...string) PipelineStructureStageOp

StructureStageParallel sets the nested parallel stages for the stage

func StructureStageParent Uses

func StructureStageParent(parent string) PipelineStructureStageOp

StructureStageParent sets the parent stage for the stage

func StructureStagePrevious Uses

func StructureStagePrevious(previous string) PipelineStructureStageOp

StructureStagePrevious sets the previous stage for the stage

func StructureStageStages Uses

func StructureStageStages(stages ...string) PipelineStructureStageOp

StructureStageStages sets the nested sequential stages for the stage

func StructureStageTaskRef Uses

func StructureStageTaskRef(name string) PipelineStructureStageOp

StructureStageTaskRef adds a task ref to the stage

func StructureStageTaskRunRef Uses

func StructureStageTaskRunRef(name string) PipelineStructureStageOp

StructureStageTaskRunRef adds a task run ref to the stage

type StageOp Uses

type StageOp func(*syntax.Stage)

StageOp is an operation on a Stage

func StageAgent Uses

func StageAgent(image string) StageOp

StageAgent sets the image/agent for a stage

func StageDir Uses

func StageDir(dir string) StageOp

StageDir sets the default working directory for the stage

func StageEnvVar Uses

func StageEnvVar(name, value string) StageOp

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

func StageOptions Uses

func StageOptions(ops ...StageOptionsOp) StageOp

StageOptions sets the StageOptions for a stage

func StageParallel Uses

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

StageParallel adds a nested parallel stage to the stage

func StagePost Uses

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

StagePost adds a post condition to the stage

func StageSequential Uses

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

StageSequential adds a nested sequential stage to the stage

func StageStep Uses

func StageStep(ops ...StepOp) StageOp

StageStep adds a step to the stage

type StageOptionsOp Uses

type StageOptionsOp func(*syntax.StageOptions)

StageOptionsOp is an operation on StageOptions

func StageContainerOptions Uses

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

StageContainerOptions sets the containerOptions for a stage

func StageOptionsRetry Uses

func StageOptionsRetry(count int8) StageOptionsOp

StageOptionsRetry sets the retry count for a stage

func StageOptionsStash Uses

func StageOptionsStash(name, files string) StageOptionsOp

StageOptionsStash adds a stash to the stage

func StageOptionsTimeout Uses

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

StageOptionsTimeout sets the timeout for a stage

func StageOptionsUnstash Uses

func StageOptionsUnstash(name, dir string) StageOptionsOp

StageOptionsUnstash adds an unstash to the stage

func StageOptionsWorkspace Uses

func StageOptionsWorkspace(ws string) StageOptionsOp

StageOptionsWorkspace sets the workspace for a stage

func StageVolume Uses

func StageVolume(volume *corev1.Volume) StageOptionsOp

StageVolume adds a volume to the StageOptions for the stage

type StepOp Uses

type StepOp func(*syntax.Step)

StepOp is an operation on a step

func StepAgent Uses

func StepAgent(image string) StepOp

StepAgent sets the agent for a step

func StepArg Uses

func StepArg(arg string) StepOp

StepArg sets the arguments for a step

func StepCmd Uses

func StepCmd(cmd string) StepOp

StepCmd sets the command for a step

func StepDir Uses

func StepDir(dir string) StepOp

StepDir sets the working dir for a step

func StepEnvVar Uses

func StepEnvVar(name, value string) StepOp

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

func StepImage Uses

func StepImage(image string) StepOp

StepImage sets the image for a step

func StepLoop Uses

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

StepLoop adds a loop to the step

func StepName Uses

func StepName(name string) StepOp

StepName sets the name for a step

func StepOptions Uses

func StepOptions(options map[string]string) StepOp

StepOptions sets the alias step options for a step

func StepStep Uses

func StepStep(s string) StepOp

StepStep sets the alias step for a step

Package syntax_helpers_test imports 8 packages (graph). Updated 2020-07-02. Refresh now. Tools for package owners.