I need my pipeline to run a task if the build is cancelled either by a user or automatically (by the system itself).
Is there any condition to do so?
Thanks!
Yes, you can use always()
steps:
- script: echo I did a thing
condition: and(always(), eq(someConditionHere))
More on that here: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.