Wait for parallel steps to finish


#1

Is there a way to wait for all parallel steps to finish to before continuing on the next step?


#2

You can use a deploy step for that;

https://circleci.com/docs/2.0/configuration-reference/#deploy


#3
      - run:
          name: Linting
          command: |
            if [ "$CIRCLE_NODE_INDEX" -eq "0" ]; then
              bundle exec rake rubocop
            fi
      - deploy:
          name: Staging Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "staging" ]; then
              bundle exec cap staging deploy
            fi
          background: true
       - run:
          name: All ActiveSupport::TestCase tests
          command: bundle exec rails test

I’d like to do something like this. Where it deploys to staging after linting, but before running all the tests. Currently the deploy step just hangs on “Waiting for parallel steps to finish”


#4

The deploy step does exactly this:

There is no other way to pause the build for other containers to finish a given task. Your best bet is to change that deploy back to a run if you want to parallelize the tests.


#5

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