How to execut deploys sequentially?

In circleCi deploys are executed parallely.
Could you tell me how to execut deploys sequentially?

For example I have 3 deploys like below.

I need to execut deploy-1 then deploy-2 then deploy-3
There is no need to have a deploy success to each other.
I just do not want to execut these deploys parallely.

workflows:
version: 2
build-and-deploy:
jobs:
- build:
- deploy:
name: deploy-1
context: k8s
namespace: “test”
requires:
- decrypt-test
filters:
branches:
only: test
- deploy:
name: deploy-2
context: k8s
namespace: “test”
requires:
- decrypt-test
filters:
branches:
only: test
- deploy:
name: deploy-3
context: k8s
namespace: “test”
requires:
- decrypt-test
filters:
branches:
only: test

:wave: Running jobs sequentially without using requires: (meaning the job will only run if the requires job is successful) is not functionality that is built into CircleCI.

There is a post on our ideas site that discusses marking jobs as optional and would assist in helping jobs continue to run even if the job before it fails. Additionally please feel free to open a new feature request if this one doesn’t quite align with what you are looking for! All the votes and comments help us shape the future of CircleCI

There is an Orb that may help with setting up sequential jobs. The Queue Orb should allow you to enforce these jobs are run sequentially and includes many options to configure this to your needs:

I hope this helps!

1 Like