jan*_*pio 5 azure-devops azure-pipelines
我有一个非常简单但缓慢(约 15 分钟)的节点测试,我想在 Ubuntu 和 Linux 上运行,并且每个测试在节点 6、8 和 10 上运行 - 总共 6 个“作业” - 通过 Azure DevOps 上的 Azure Pipeline 。
我的azure-pipeline.yml看起来像这样:
jobs:
- job: Ubuntu
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
version: $(node_version)
displayName: 'Install Node.js $(node_version)'
- script: |
npm install
displayName: 'npm install'
- script: |
npm run test
displayName: 'npm test'
- job: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
version: $(node_version)
displayName: 'Install Node.js $(node_version)'
- script: |
npm install
displayName: 'npm install'
- script: |
npm test
displayName: 'npm test'
Run Code Online (Sandbox Code Playgroud)
由于这是 GitHub 上的开源存储库,我预计这 6 个测试运行会并行发生(因为应该有 10 个并行作业)。
观察将拉取请求添加azure-pipeline.yml到我的存储库的管道运行,似乎只是有时出现一些并行性。我经常等待几分钟才能开始任何工作。这是否可能是 Azure Pipelines 端的容量问题,没有可用的代理来运行测试?
当某项启动时,每个操作系统大多只有 1 个作业,而其他作业则为matrix“未启动/已排队”。作业不应该matrix并行执行吗?
这让我想到了真正的问题:
有没有办法在 Microsoft 托管代理池上的 Azure Pipelines 上实现作业的实际并行执行?
改变
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
Run Code Online (Sandbox Code Playgroud)
到
strategy:
maxParallel: 3
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
Run Code Online (Sandbox Code Playgroud)
(注意附加的maxParallel: 3)似乎已经完成了工作:一旦提交到 PR 分支,构建就会一起开始。
而maxParallel目前仅记录为“限制并行度”。,似乎根本需要获得matrix配置的并行性。
(YAML 模式中的 Job文档没有帮助,因为它显示maxParallel为matrixor的替代方案parallel。)
| 归档时间: |
|
| 查看次数: |
2134 次 |
| 最近记录: |