最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Filtering azure devops release build based upon build tag with "Continuous deployment trigger" - Stack Overflo

programmeradmin0浏览0评论

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
  • It is not possible to specify build tags in 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
  • @RuiJarimba chatgpt suggested it – SpaceGhost440 Commented Nov 20, 2024 at 16:13
Add a comment  | 

1 Answer 1

Reset to default 1

TL;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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论