Parameterized pipelines
Parameterized pipelines offer a powerful way to customize and configure your workflows in Buddy. Each pipeline can be parameterized with environment variables to suit various scenarios. 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.
Passing parameters on pipeline run
One of the methods to define the pipeline behavior is through the Pass Params action:
Pass arguments action details
During the execution, this action pauses your pipeline and prompts you to specify the parameters:
Specifying the parameter
The parameters defined in this action can be used similarly to environment variables. For example, you can set a parameter that asks whether you want to send a Slack message about a new version to your clients. You can then define the trigger condition based on this parameter in the Slack action.
Passing parameters between pipelines
Buddy allows you to create advanced processes by linking multiple pipelines together in one string using the Trigger Pipeline action. This action lets you pass parameters from one pipeline to another, parameterizing the execution of the second pipeline.
For example, let's say your parent pipeline is triggered when a new tag is pushed to the backend repository. You can pass the value of that tag to the second pipeline in the frontend project:
Passing parameters with Trigger Pipeline action
Manual 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, in some cases you may want certain actions to run automatically, others requiring manual intervention – all within the same pipeline.
This is where the Approve Run action proves useful. For instance, 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 straightforward and requires adding the action and specifying who is allowed to resume the execution:
Wait for approval configuration
Once the action is added, the pipeline execution will stop and wait for a developer with proper permissions to resume it:
Approval prompt
Last modified on January 19, 2024