WorkItemUpdater
WorkItemUpdater copied to clipboard
Tag based on Build Variable
Hello,
Is it possible to use build variables in the tags. I have tried with the following two YAMl options (I am running a multi stage YAML pipeline).
Where ENV_RELEASE is a custom variable set at runtime and BUILD_REPOSITORY_NAME is a standard one set by the pipeline.
- task: WorkItemUpdater@2
displayName: 'Tag WorkItems'
inputs:
workitemsSource: 'Build'
workItemType: 'Bug,Feature,Task,User Story'
linkBuild: true
updateAssignedTo: 'Never'
addTags: |
${{ parameters.environment }}
$(BUILD_REPOSITORY_NAME)
$(ENV_RELEASE)
Results in the following tags 'cl-uat', '$(BUILD_REPOSITORY_NAME)', '$(ENV_RELEASE)' THe first tag is correct, but the other two are not.
The following has the same issue.
- task: WorkItemUpdater@2
displayName: 'Tag WorkItems'
inputs:
workitemsSource: 'Build'
workItemType: 'Bug,Feature,Task,User Story'
linkBuild: true
updateAssignedTo: 'Never'
addTags: |
${{ parameters.environment }}
$[variables.BUILD.REPOSITORY.NAME]
Same results as avove .Tags 'cl-uat', '$[variables.BUILD.REPOSITORY.NAME]', '$[variables.ENV_RELEASE]'
Any pointer here would be great.
Thanks,
Basil