Peter Boomsma
Peter Boomsma

Reputation: 9808

How to add/use a build tag?

In my build definition I have:

- task: PowerShell@2
  inputs:
    targetType: 'inline'
    script: '##vso[build.addbuildtag]pr-completed'
  displayName: 'add pr-completed buildtag'

I would expect this to add a pr-completed tag to the build. In my release pipeline I have a stage called stage 1. In this stage I have set a artifact filter:

enter image description here

But after running a build I get:

enter image description here

Am I implementing tags wrongly?

Upvotes: 6

Views: 3615

Answers (1)

Peter Boomsma
Peter Boomsma

Reputation: 9808

I made a mistake in the build.addbuildtag script:

script: Write-Host "##vso[build.addbuildtag]pr-completed"

I forgot the Write-host part.

Everything works now. Leaving this question as a reference for other people.

Upvotes: 6

Related Questions