英文:
How to specity workspace clean for hosted agents in Azure DevOps build pipeline for Pipeline with steps and one implicit job?
问题
我正在尝试按照这里所描述的方式清理DevOps工作区(具有步骤和一个隐式作业的流水线)。
从我看到的情况来看,我应该在YAML中添加一个workspace:
行,但当我按照说明操作时,我收到一个错误,提示说
Unexpected value 'workspace'
相关的流水线片段如下:
pool:
name: 'Hosted Agents'
workspace:
clean: all
英文:
I am trying to clean the DevOps workspace as described here (Pipeline with Steps and one implicit job)
From what I see, I should add a workspace:
row in the YAML, but when I follow the instruction I get an error saying
Unexpected value 'workspace'
The relative pipeline snippet is the following:
pool:
name: 'Hosted Agents'
workspace:
clean: all
答案1
得分: 0
与Microsoft文档中此处和此处所示的方式不同,使其工作的唯一方法是在pool
的同一级别添加workspace
元素,而不是在pool
的同一级别添加name
:
pool:
name: 'Hosted Agents'
workspace:
clean: all
而不是在pool
的同一级别。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论