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
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
- CircleCI Configuration Reference
- CircleCI Feature Requests - You can view and upvote feature requests, including the ability to sort jobs in the workflows UI.
Comments
Article is closed for comments.