I am adding a build tag using the below yaml powershell script. The final result will have a condition, but for testing purposes the condition was omitted. I am then trying to filter the release using the bottom picture. I have tried using "skip-release" with an exclude, and "-skip-release" with an include. Neither work. The release is always triggered.
- task: PowerShell@2
inputs:
targetType: inline
script: |
Write-Host "##vso[build.addbuildtag]skip-release"
QUESTION: Do build tags actually work in the release filters? Or am I doing something wrong? I have searched for days, and asked both chatgpt and claude. No answers found yet.
I am adding a build tag using the below yaml powershell script. The final result will have a condition, but for testing purposes the condition was omitted. I am then trying to filter the release using the bottom picture. I have tried using "skip-release" with an exclude, and "-skip-release" with an include. Neither work. The release is always triggered.
- task: PowerShell@2
inputs:
targetType: inline
script: |
Write-Host "##vso[build.addbuildtag]skip-release"
QUESTION: Do build tags actually work in the release filters? Or am I doing something wrong? I have searched for days, and asked both chatgpt and claude. No answers found yet.
Share Improve this question asked Nov 20, 2024 at 15:11 SpaceGhost440SpaceGhost440 5794 silver badges20 bronze badges 2 |1 Answer
Reset to default 1TL;DR Excluding tags is not supported.
I suggest you try the opposite approach, i.e. add a tag to the builds you want to deploy and then configure the branch filters with an Include
condition.
Example:
Notes:
- All the filters specified here will be OR'ed, i.e., artifact matching at least one filter condition would be sufficient to trigger a release.
- If you include multiple tags in the same line, they are AND-ed while evaluating the trigger condition, whereas if you include tags in separate lines, they are OR-ed.
Exclude
filters. Why are you trying to use a tag with a minus prefix such as-skip-release
? That's not the correct tag value. – Rui Jarimba Commented Nov 20, 2024 at 15:40