Parameterized pipelines
Parameterizing pipelines
Each pipeline can be parameterized with environment variables. The variables can be used to configure actions or write build and deployment scripts. You can also use them as trigger conditions to define if a given action should be executed or not.
Parameterizing a pipeline on the pipeline run
One of the methods to define the way pipelines work is using the Pass params action:
Pass arguments action details
During the execution, this action will pause your pipeline and ask to specify the parameters:
Specifying the parameter
Parameters defined in this action can be used just like environment variables. For example, you can set a parameter that will ask if you want to send a Slack message about the new version to your clients, and then define the trigger condition basing on this parameter in the Slack action.
Parameterizing the execution with another pipeline
Buddy enables you to create advanced processes by linking many pipelines in one string. This is performed with an action called Trigger pipeline.
The action lets you pass parameters from one pipeline to another, parameterizing the execution of the second pipeline.
'Wait for approval' action
One of the basic features of pipelines is automatic triggering, most often used to test the application on every push to the repository. However, sometimes you may want a part of the actions to run automatically, and some other part manually — all within one pipeline.
This is where the action Wait for approval proves useful. For example, you can use it to manually confirm the deployment to the server, provided the automatic tests have finished successfully:
Example of pipeline using Wait for approval action
Configuration is very simple and requires adding the action and selecting who is allowed to resume the execution:
Wait for approval configuration
Once you add the action, the execution will stop and wait for a developer with proper permissions to resume it:
Approval prompt
Last modified on July 10, 2023