Order Workflows in CircleCI

Overview

CircleCI does not currently offer a built-in feature to sort workflows numerically or alphabetically. Workflows are triggered in the order they are defined in your .circleci/config.yml file. This article provides guidance on how to structure your configuration file to achieve a desired order.

Solution

To control the order in which your workflows are triggered, define them in your .circleci/config.yml file in the sequence you want them to run. For example, if you have workflows named A, B, and C, and you want them to run in alphabetical order, you should define them in reverse order in your configuration file:

version: 2.1

jobs
job:
docker:
- image: cimg/baser:current
steps:
- checkout
- run: echo "Hello, World!"

workflows:
C:
jobs:
- job
B:
jobs:
- job
A:
jobs:
- job

Screenshot 2025-02-11 at 17.41.47.png

Important Note

The execution order of workflows is not guaranteed and can be influenced by factors such as resource availability. Therefore, while you can define the order in your configuration file, the actual execution might vary.

Additional Resources

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.