Concatenation of parameters/variables arrays in Azure DevOps Pipelines

  Kiến thức lập trình

Given 2 parameters of type “array” in some reusable template:

parameters:
  - name: stageDependsOn
    type: object
    default: []
  - name: _defaultDependsOn
    type: object
    default: ['must_have_stage']

… how to concatenate them into a single array at use-place? Looking for something like this, but concat does not exist:

- stage: targetStage
  displayName: Target stage
  dependsOn: ${{ concat(parameters._defaultDependsOn, parameters.stageDependsOn) }}

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT