When CircleCI runs your config.yml it will expand the config to be able to run all of the commands and orbs that have been called, you can view this compiled version of the config using a button on the UI, or throught the API.
Through the UI:
Go to your pipelines page
Click on the three dots on the right of one of your workflows that have run
Click on the Configuration File button
On the top right press the compiled button as shown in the screenshot below
Through the API:
The getPipelineConfigById endpoint will return both the source and compiled configuration.
This can be useful for programmatic analysis, or comparison of the source and compiled configs.
You can use the following example to retrieve the config for a given pipeline:
curl --request GET \
--url https://circleci.com/api/v2/pipeline/{PIPELINE_ID}/config \
--header 'Authorization: Basic REPLACE_BASIC_AUTH'Outcome
You will see that the code has changed to the compiled code and your original code can be found at the bottom as a comment.
This can be used to help identify the code that ran to help debug any issues that you find from commands that are called.
Comments
Article is closed for comments.