简体   繁体   中英

Triggering Azure DevOps Releases based ona a build variable

With the script in this question's most upvoted answer: Triggering Azure DevOps builds based on changes to sub folders

I managed to skip the build process on all projects that weren't being modified on each commit, but their release still executes and fails because it doesn't find any artifact. Is there a way to also skip the release linked to a build from being executed if the build was skipped?

Yes, you can add a custom condition to a release job that evaluates a variable.

For example, in one of my pipelines, I have an agentless job which checks that a build variable is not empty. There is a dummy wait task for 0 minutes in it.

The following job, which contains the actual release process, has a condition that tells it to run only if the previous one has completed successfully.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM