Home > front end >  Unable to add tag to Azure pipeline during build
Unable to add tag to Azure pipeline during build

Time:11-14

I want to tag my pipeline build during the build process itself. For which based on the official document I tried echo ##vso[build.addbuildtag]testing in the pipeline yaml. There was no error but the build was not tagged either.

I'm able to add tags from portal successfully.

My pipleine yaml below.

pool:
  vmImage: ubuntu-latest

jobs:
- job: addingtag
  displayName: addingtag
  steps:
  - script: |
        echo ##vso[build.addbuildtag]testing
    displayName: addingtag

Below are other combinations I tried and still failed. echo ##vso[build.addbuildtag] testing echo ##vso[build.addbuildtag]Tag_testing

CodePudding user response:

You may need to add double quotes, I could successfully add tag by using YAML script like below.

- script: |
    echo "##vso[build.addbuildtag]testing"
  displayName: addingtag
  • Related