This is part of my Yml file
I need to re-call this template if it failed.it should be rerun again. After a few seconds, ideally.I am new to yml files
I tried to use retryCountOnTaskFailure but it should be under task but the template calling different hierarchy
- template: ${{variables['System.DefaultWorkingDirectory']}}
parameters:
Test: ${{ parameters.isTestRelease }}
Environment: ${{ parameters.deploymentTarget }}
Component: '${{ parameters.component }}'
2
Answers
The retryCountOnTaskFailure feature is applied to individual tasks within a pipeline. Templates aren’t tasks, they act more like an include that expands the contents of the template into your pipeline.
And within the template, you’d want to add the retry logic to specific tasks:
It’s also located under "Control Options" when the "Command Line" task is added: