Azure Devops - 无法构建从 vs2017-win2016 到 windows-latest 的管道代理

mev*_*sim 2 yaml azure-devops azure-pipelines

我的管道运行后,它给了我以下警告。

##[warning]The windows-2016 environment will be deprecated on November 15, 2021, 
and removed on March 15, 2022. Migrate to windows-latest instead. 
For more details see https://github.com/actions/virtual-environments/issues/4312
Run Code Online (Sandbox Code Playgroud)

看到该警告后,我尝试将 Agent Sepecification 从 vs2017-win2016 更改为 windows-latest。但代理规范下拉列表中没有 Windows 最新选项。

代理规范下拉列表

所以,我认为我可以从管道 yaml 文件更改它。但我无法在 yaml 编辑器上编辑管道。因为编辑页面仅以 UI 编辑器格式显示,如下图所示。

任务助手界面

我的问题是,如何打开 yaml 文件格式的管道编辑页面?如果不允许这样做,我如何为代理规范选择 windows-latest 选项?

jes*_*ing 6

在 YAML 管道中,有一些神奇的代理池别名可以让您保持受支持的映像。windows-latest等。ubuntu-latest在基于 UI 的管道中,这些别名不存在,因此您需要手动选择较新的图像。

您可以在 GitHub 1上跟踪图像的演变,其中还列出了哪些图像可用以及哪些图像点(截至 2021 年 11 月 8 日):*latest

可用图像和别名的列表

1 ) GitHub Actions 和 Azure Pipelines 使用相同的底层映像。

只需在 UI 管道中选择其中任何一个并点击Save

在基于 UI 的管道中将 Agent Specetecation 设置为“windows-2019”