How to specity workspace clean for hosted agents in Azure DevOps build pipeline for Pipeline with steps and one implicit job?

huangapple go评论61阅读模式
英文:

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的同一级别。

英文:

Differently from what showed in Microsoft documentation here and here , the only way to make this work is adding the workspace element at the same level of the name within the pool:

pool:
  name: 'Hosted Agents'

workspace:
  clean: all

And not at the same level of pool

huangapple
  • 本文由 发表于 2023年5月22日 19:28:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76305697.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定