How to achieve actual parallel execution of jobs on Azure Pipelines on pool of Microsoft-hosted agents?
我有一个非常简单但很慢(?15分钟)的节点测试,我想在Ubuntu和Linux上运行,并且分别在节点6、8和10上运行-通过Azure管道总共6个"工作"在Azure DevOps上。
我的
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 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' |
因为这是GitHub上的开源存储库,所以我希望这6次测试运行可以并行进行(因为应该有10个并行作业)。
观察将
启动某件事时,每个操作系统通常只有一项工作,而
这带给我我真正的问题:
有没有一种方法可以在Microsoft托管代理的池上的Azure Pipelines上实现作业的实际并行执行?
更改
1 2 3 4 5 6 7 8 | strategy: matrix: node_6_x: node_version: 6.x node_8_x: node_version: 8.x node_10_x: node_version: 10.x |
到
1 2 3 4 5 6 7 8 9 | 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 |
(请注意附加的
虽然
(YAML模式中的Job文档没有帮助,因为它显示