Reputation: 5865
In the graphical build editor there was a hint if there is a new version of a build task:
Is there any equivalent in the YAML editor?
Or is there any other option to find out, if there is a new task version available (besides searching the documentation)?
Upvotes: 2
Views: 715
Reputation: 51093
Tasks are versioned, and you must specify the major version of the task used in your pipeline. This can help to prevent issues when new versions of a task are released.Tasks are typically backwards compatible, but in some scenarios you may encounter unpredictable errors when a task is automatically updated.
When a new minor version is released (for example, 1.2 to 1.3), your build or release will automatically use the new version. However, if a new major version is released (for example 2.0), your build or release will continue to use the major version you specified until you edit the pipeline and manually change to the new major version. The build or release log will include an alert that a new major version is available.
If you are using a deprecated task, you will also find this kind of info in log such as:
Even in classic editor, not every task was a hint if there is a new version, it's more related to two points: 1. Task Author 2. If old task is deprecated.
However, if I do the same with PowerShell@2to PowerShell@1, I get no warning
Cause you could use either powershell version 1 or version 2 even though the higher version of one task is more recommended.
Besides, if you use other shortcuts in YAML without version specificed, it resolve to the PowerShell@2 task:
- powershell: # inline script
workingDirectory: #
displayName: #
failOnStderr: #
errorActionPreference: #
ignoreLASTEXITCODE: #
env: # mapping of environment variables to add
You could also take a look at this similar issue: How do I specify "always latest" task version in YAML?
Upvotes: 2
Reputation: 40603
You task version is specified after @
so DevEnvBuild@1
means you have version 1 of this task. So please change to DevEnvBuild@2
and you are good to go.
And in terms of being notified about new version. I think there is no out of the box solution, but if I use version 1
I have a warning:
Which disappear in version 2
Upvotes: 0