Bab*_*aig 5 pipeline circleci devops circleci-workflows circleci-2.0
我已遵循作业和条件工作流程中的条件步骤中描述的指南,并为我的 CircleCI 管道编写了以下代码。
version: 2.1
workflows:
version: 2.1
workflowone:
when:
condition: false
jobs:
- samplejob:
workflowtwo:
when:
condition: true
jobs:
- jobone
jobs:
samplejob:
docker:
- image: buildpack-deps:stable
steps:
- run:
name: Sample Job in WF 1
command: |
echo "This job is in workflowone and the workflow should not run"
jobone:
docker:
- image: buildpack-deps:stable
steps:
- run:
name: Sample Job in WF 2
command: |
echo "This job is in workflowtwo and the workflow should run"
Run Code Online (Sandbox Code Playgroud)
当我运行上面的代码时,输出不是预期的。第一个工作流不应运行,因为条件为假。当管道触发时,两个工作流程都开始运行。谁能指出这里缺少的部分吗?
| 归档时间: |
|
| 查看次数: |
10976 次 |
| 最近记录: |