I am creating a CICD pipeline in Azure DevOps. I have a pipeline that has a name set dynamically.
name: 'Set dynamically below in a task'
Then in BUILD stage I update it
[string] $date = (Get-Date -Format 'yyyyMMdd')
[string] $projectVersion = (Get-Content 'version.json') -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
[string] $buildName = "$projectVersion.$(Build.BuildId)+$date.API"
I have currently 3 stages
- builds up
- set build name via VSO command
- publish artifact
- Deploy to DEV
- download artifact and deploy to the dev environment
- Deploy to TEST
- download artifact and deploy to test environment
I am actually using ENVIRONMENT within Azure DevOps to track all deployments and here is the problem. While pipeline build number is updated properly in Pipelines view
when I go to Environments tab the not so updated build name is being displayed.
How can I change that?