ADO: How to mark fail to release definition, if triggered build from release fails

I have a release definitions in azure-DevOps. I want to trigger an existing build definition from release so added trigger build task as the last step. Now I want to mark the pass or fail to release trigger step based on build result. Currently, It always passes after just triggering the build. Please suggest any solution.

Upvotes: 0

Views: 166

Answers (1)

Jonathan Dodds
Jonathan Dodds

Reputation: 5163

A trigger will start a pipeline. That's it.

A trigger doesn't support waiting for the triggered pipeline to complete and, because it doesn't wait, doesn't support communicating the pass/fail result of the triggered pipeline back to the initiator of the trigger.

I assume you are using a third party task or directly calling the Azure DevOps API to get a trigger of a build from a release. Conceptually a release pipeline should not be triggering a build pipeline. It could be considered a 'code smell' and be a symptom of an issue with how the pipelines are structured.

Upvotes: 0

Related Questions