CircleCI build pipelines are defined in a
.circleci/config.yml file. This config file differs from other CI/CD services such as Shippable. Developers interested in migrating their code repository and/or open source project build configurations to CircleCI are sometimes deterred from doing so because they don’t understand the differences between their current CI/CD service configurations and CircleCI’s build configurations.
In this post, I’ll compare Shippable build configuration elements with their CircleCI counterparts, and help translate wherever possible. Since Shippable and CircleCI are very different systems, not all build elements will be available in CircleCI and vice versa, but I hope this guide can help those looking to learn more about how they are similar and different.
The table below represents the Shippable build elements and their CircleCI equivalents, when applicable.
|language:||docker.image||Use the Docker executor to specify an appropriate Docker image for the target language|
|runtime:||docker, machine, macos, windows||executors define the environment in which the steps of a job will be executed|
|env:||environment:||Use the environment: element to specify environment variables|
|matrix:||matrix||Use the matrix: element to run a parameterized job multiple times with different arguments|
|build:||jobs:||jobs: elements define build related jobs within the pipeline|
|pre_ci:||pre-steps:||Use the pre-steps: element to execute steps before any of the other steps in the job|
|ci:||jobs: and workflows:||Use a combination of jobs: and workflows: elements to define and orchestrate jobs within the pipeline|
|post_ci:||post-steps:||Use the post-steps: element to execute steps after all of the other steps in the job|
|on_success:||logic statements||Use logic statements to evaluate arguments at configuration compilation time before the workflow is executed|
|on_failure:||logic statements||Use logic statements to evaluate arguments at configuration compilation time before the workflow is executed|
|always:||logic statements||Use logic statements to evaluate arguments at configuration compilation time before the workflow is executed|
|cache:||restore_cache:, save_cache:||Use the restore and save cache features to control caching in the builds|
|cache_dir_list:||restore_cache:, save_cache:||Use the restore and save cache features to control caching in the builds|
|keys:||add_ssh_keys:||Use the add_ssh_keys: element to configure SSH to use the specified keys|
I hope this post can serve as a guide for developers that are interested in understanding the differences between Shippable configurations and a compatible CircleCI build configuration. The reference table listed above shows the common Shippable to CircleCI configuration elements and can be a great starting point for Shippable users interested in migrating their CI/CD pipelines to build, test, and deploy on the CircleCI platform.
If you get stuck, you can reach out to the CircleCI community via the community forum.