Hi,
I recently migrated from 0.8 to 1.0 and noticed that parallel pipeline steps with the group
field have been removed. Now I tried using a multi-machine pipeline, but this doesn’t work for development when using drone exec
. Only the first pipeline step is executed this way.
Am I missing something?
---
kind: pipeline
name: foo
steps:
- name: build
image: alpine
commands:
- sleep 1
- echo "foo"
- sleep 1
- echo "foo"
- sleep 1
---
kind: pipeline
name: bar
steps:
- name: build
image: alpine
commands:
- sleep 1
- echo "bar"
- sleep 1
- echo "bar"
- sleep 1
1 Like
The only way to force parallelism is to have an extra empty pipeline step with depends_on
. This is a bit weird
kind: pipeline
name: in_parallel
steps:
- name: foo
image: alpine
commands:
- sleep 1
- echo "foo"
- sleep 1
- echo "foo"
- sleep 1
- name: bar
image: alpine
commands:
- echo "bar"
- sleep 1
- echo "bar"
- name: force_parallel
image: alpine
depends_on:
- foo
- bar
You can put depends_on: [ clone ]
on the first two steps to make them parallel, then you shouldn’t need the third step. This is because they run in serial if there is no depends_on
in any step, probably to make simple pipelines easier to read and write.
That doesn’t actually work. When adding depends_on
to the first steps you get with the latest drone cli (1.0.7):
2019/03/28 15:23:35 missing vertex
depends_on: [ clone ]
works with the server, but does not work with the CLI
Is there a way to make it work with the CLI?
2 Likes