webish
webish

Reputation: 711

set azure devops pipeline version control tag from task

Version tag is parsed from a file in an azure devops pipeline task but needs to be utilized at the end of the agent pipeline to set the version control tag.

I cannot seem to set the variable with enough scope to be available for the post run tagging.

How can you set a variable in a task that is agent scoped and can be used as the version control tag?

Upvotes: 1

Views: 353

Answers (1)

Hugh Lin
Hugh Lin

Reputation: 19451

You can set version tag as an environment variable in powershell task.

$VERSION_TAG = {parsed value}
Write-Host "##vso[task.setvariable variable=VERSION_TAG]$VERSION_TAG"

Upvotes: 0

Related Questions