Documentation ¶
Index ¶
Constants ¶
const ( // ResultStepPart Constant used to define the "steps" part of a step result reference ResultStepPart = "steps" // ResultTaskPart Constant used to define the "tasks" part of a pipeline result reference ResultTaskPart = "tasks" // ResultFinallyPart Constant used to define the "finally" part of a pipeline result reference ResultFinallyPart = "finally" // ResultResultPart Constant used to define the "results" part of a pipeline result reference ResultResultPart = "results" )
Variables ¶
var StepResultRegex = regexp.MustCompile(stepResultUsagePattern)
StepResultRegex compiles the regex pattern for the usage of step results.
Functions ¶
func LooksLikeResultRef ¶
LooksLikeResultRef attempts to check if the given string looks like it contains any result references. Returns true if it does, false otherwise
func ParseResultName ¶
ParseResultName parse the input string to extract resultName and result index. Array indexing: Input: anArrayResult[1] Output: anArrayResult, "1" Array star reference: Input: anArrayResult[*] Output: anArrayResult, "*"
Types ¶
type ParsedResult ¶
type ParsedResult struct { ResourceName string ResultName string ResultType string ArrayIdx *int ObjectKey string }
ParsedResult captures the task/step name, result name, type, array idx (in case of array result) and object key (in case of an object result). This is generated by parsing expressions that use $(tasks.taskName.results.resultName...) or $(steps.stepName.results.resultName...)
func ParseStepExpression ¶
func ParseStepExpression(substitutionExpression string) (ParsedResult, error)
ParseStepExpression parses the input string and searches for the use of step result usage.
func ParseTaskExpression ¶
func ParseTaskExpression(substitutionExpression string) (ParsedResult, error)
ParseTaskExpression parses the input string and searches for the use of task result usage.