Allow turning off parallelism for steps in a parallelism enabled job?

right now we have a job that runs in parallel, with parallelism set to 5. but we have some steps, that we would like to run at the end, waiting for all containers job to finish.

I know there’s a deploy step right now, but it will only run if all containers were successful, and we would want to run the step regardless of the container status.

we would like to be able to add something like this:

jobs:
    run_something:
       parallelism: 5
       steps:
          run: some stuff in parallel
          run: 
              when: on_fail
              command: wait for all containers to finish, and do something if any of the containers had a failed status
          run: 
              when: on_success
              command: wait for all containers to finish, and do something if all containers succeeded (i think this is same as "deploy" step)
          run: 
              when: always
              command: wait for all containers to finish, and do this

is this possible? any ideas how i can achieve what we want to do?

1 Like

I’ve not done this, but I believe this is called “fan in and fan out”. Perhaps this would be useful:

https://circleci.com/docs/2.0/sample-config/#sample-configuration-with-fan-infan-out-workflow

this could work if the dependent workflow succeeds, but we’re also needing it for when the workflow fails. Any ideas how I could do that?

Not a sausage, I’m afraid. Perhaps someone else would have an idea :thinking: