Similar to Run "setup-docker-engine" only on certain branches, but this is about running it only on certain nodes of a parallel build.
My team runs a parallel build, primarily because we have two large codebases in a common repo, and they take about the same amount of time to build and test, so we run them in parallel, which is awesome.
Each branch of the build builds docker images, so
setup-docker-engine being global is fine.
I was experimenting today with a 3-wide approach, with a third parallel node doing all the docker stuff. This works great, except that now I really want
setup-docker-engine to apply only to this node.
setup-docker-engine: nodes: - 2
would be great.
Alternatively, if setup-docker-engine could be a binary we can call from shell, you could do:
- run: | if [[ $CIRCLE_NODE_INDEX == 2 ]]; then setup-docker-engine fi