I have a simple pipeline decorator :
steps:
- ${{ each step in job.steps }}:
- ${{ if eq(step.task.id, '2ff763a7-ce83-4e1f-bc89-0ae63477cebe') }}:
- task: powershell@2
displayName: '(injected) Verify Publish Artifact task parameters'
inputs:
targetType: inline
script: |
$s = @'
${{convertToJson(step)}}
'@
$step = ConvertFrom-Json $s
Write-Host "todo: validate the step parameters"
It raises an error.
Here is the log :
Begin evaluating template 'BuildPreJob.yml@'
Evaluating: job['steps']
Result: Object
[error]BuildPreJob.yml@ (Line: 2, Col: 5):
Finished evaluating template 'BuildPreJob.yml@'
Doesn't matter what else is in the yaml file. It doesn't work as long as it contains this
- ${{ each step in job.steps }}:
For example this one doesnt work as well
steps:
- ${{ each step in job.steps }}:
- task: powershell@2
displayName: '(injected) Verify each step'
inputs:
targetType: inline
script: |
Write-Host "todo: validate the step parameters"
It raises the same error.
Is there any suggestion ?
Do you know where I can find a full documentation?
here is the log :
Begin evaluating template 'BuildPreJob.yml@'
Evaluating: job['steps']
Result: Object
[error]BuildPreJob.yml@ (Line: 2, Col: 5):
Finished evaluating template 'BuildPreJob.yml@'