azure-devops - 在 Azure Devops 中按顺序运行作业

标签 azure-devops yaml azure-pipelines

stages:
- stage: A
     jobs:
     - job: A1
     pool: CloneX
     displayname: My Job A
     - job: A2
     pool: CloneX
     displayname: My Job B

这是我的 Azure Devops yaml。

我注意到 2 个代理(作为 Windows 服务)在同一台 Pool 机器 CloneX 上运行。它是一台内部机器。

作业 A1 和作业 A2 必须按顺序运行。

但是,A1 和 A2 是并行安排的。

如何解决这个问题?

通过将工作 A2 移至阶段 B?或者

在池 CloneX 上只保留 1 个代理?

最佳答案

您可以指定 job dependencies

jobs:
- job: Debug
  steps:
  - script: echo hello from the Debug build
- job: Release
  dependsOn: Debug
  steps:
  - script: echo hello from the Release build

关于azure-devops - 在 Azure Devops 中按顺序运行作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71524681/

相关文章:

Azure 存储帐户防火墙规则阻止使用 azure devops 进行 terraform 部署

azure - 如何在 Azure Devops API 中获取 userId 字段

ruby-on-rails - rails : specify list of items in yml

java - 将私钥放入带有变量的 application.yml 中

github - 为 GitHub 拉取请求触发 Visual Studio Team Services 构建

npm - Azure 管道 "Cache@2"失败并显示 "##[error]The system cannot find the file specified"

python - Azure DevOps Pipeline 上没有日志记录

go - 使用 golang 从 YAML 解码/编码多行字符串字段

build - 在 ms 托管的构建服务器中构建报告查看器时出现问题

azure - 从 Bicep 中的符号名称数组获取资源