Parallel execution in Drone 1.0.0

Hello,

In Drone 1.0.0, is there something equivalent to the Drone 0.8 group attribute for parallel execution of build steps?

Thanks,
Allan

I think this is what Multi-Machine Pipelines are for.

You can use multiple pipelines and depends_on to control parallel pipeline execution even on a single machine. In this example build-1 and build-2 will execute in parallel and build-3 will wait for them to complete:

---
kind: pipeline
name: build-1

steps:
  - name: build
    image: plugins/docker
    ...
    
---
kind: pipeline
name: build-2

steps:
  - name: build
    image: plugins/docker
    ...

---
kind: pipeline
name: build-3

depends_on:
  - build-1
  - build-2

steps:
  - name: build
    image: plugins/docker
    ...

The documentation suggest this is still supported though and should be preferred over multi-machine pipelines:

Please be warned that most projects do not require multi-machine pipelines. You should exhaust every other option, including parallel pipeline steps

But I can’t get it to work:

kind: pipeline
name: default

steps:
- name: test1
  image: ...
  group: tests
  commands:
  - ...

- name: test2
  image: ...
  group: tests
  commands:
  - ...

Maybe the syntax changed?

You are correct. I found the multi-machine pipeline solution in a discussion @bradrydzewski had about parallel execution at some point. I can’t seem to find it now. I’m currently using the “multi-machine pipeline” solution with a node filter so it isn’t really multi-machine. It isn’t pretty, but it works. Parallel step execution would be cleaner and reduce the complexity. I hope there is just a syntax change that we are both missing.

Brad told me in gitter that group is not (yet?) implemented in 1.0.0

1 Like