Adding a tag to the build doesn't trigger rele

2019-09-16 18:21发布

问题:

We have two environments INT and PROD. We have a schedule trigger for INT and continuous deployment trigger for PROD. Whenever INT build is verified we add a tag to the build int_verified. The continuous deployment trigger on PROD is set to trigger for builds with tag int_verified. I was hoping that whenever a new tag is added to the build the triggers are triggered and the PROD deployment would start. However, it doesn't seem to be the case. Is there a different way to get this working?

回答1:

Just add the build tag to the completed build doesn’t trigger release. You need to add build tag during the build.

For example:

  1. Add PowerShell task
  2. Add tag by using this code:

    Write-Host "##vso[build.addbuildtag]int_verified"

More information about logging, you can refer to: Logging Commands