Run build step only once (parallel build)

paralellism

#1

I have a rubocop step at the end of my build, I’m running tests in parallel - I don’t need every container to do the rubocop step - preferably just the container that gets to it first. Is there a way to do this? (Or even just say container 0 always runs it).


#2

You could create a new job at the end of the suite to run it (it won’t run until all previous depending jobs are green), or have it not depend on any other job.


#3

Ah, yeah, that would work, if I wanted the overhead of a separate build. (Presuming you mean using the 2.0 workflows?)

What I ended up going with was checking the CIRCLE_NODE_INDEX, if it’s 0 then running the step.


#4

Yes, I meant the 2.0 workflows since this post is under the “Circle 2.0” category :smile:

Oh, I didn’t know this ENV var existed, nice!


#5

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.