下面的结构确保每个Stage
都按顺序运行。然而,每个阶段 * 构建一个新的容器 *。我需要顺序动作在 * 一个 * 容器上工作。
- stage: build
jobs:
- job: build_main
pool:
type: linux # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
variables:
ob_outputDirectory: '$(REPOROOT)\out'
ob_sdl_binskim_break: true
steps:
- task: Bash@3
displayName: "Install conda/python3.10, unixodbc, pytest and requirements"
inputs:
targetType: 'inline'
workingDirectory: $(FRAMEWORK_DIR)
script: |
make setup-python-in-ubuntu
make setup-local
- stage: test
dependsOn: build
jobs:
- job: test_main
pool:
type: linux # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
variables:
ob_outputDirectory: '$(REPOROOT)\out'
ob_sdl_binskim_break: true
steps:
- task: Bash@3
displayName: "Run tests"
inputs:
targetType: 'inline'
workingDirectory: $(FRAMEWORK_DIR)
script: |
make test
- task: Bash@3
displayName: "Run unit tests report"
inputs:
filePath: $(Build.SourcesDirectory)/src/framework/scripts/run-unit-tests-report
可以使用stage
/job
/task
/step
的 * 任何 * 组合,只要满足以下两个要求:
- 连续
- 在 * 同一个 * 容器上操作
如何在ADO
中实现这一点?
1条答案
按热度按时间nhhxz33t1#
作业是由代理或服务器上运行的步骤的集合。