When the idea of Buddy was shaping, our desire was to make a Continuous Delivery tool that will be easy to set up, but also flexible.
Today we’re adding another brick that will let you customize your pipelines even more: the possibility to parameterize your execution.
How to set up and use parameters
At the beginning of your pipeline, add the Pass arguments action (you can find it in the Setup section):
Now you need to specify which parameters you will be asked for:
Once done, during every execution your pipeline will stop and wait for the defining arguments for the parameters:
Use Parameters like Buddy’s Environment Variables
Parameters can be used just like environment variables. You’re able to use them in any action, for example: to create an if-statement for the parameter in the build action:
You can also use them in any input that defines an action, eg. define a password to the FTP server that you deploy to. Thanks to that, anyone who doesn’t know the password to the server won’t be able to deploy the files:
When adding parameters you can mark any of them as encrypted so their value won’t be displayed in the logs.
By default, you’re able to assign any value to the parameter; however, you can limit that by defining a value set that is available. You can do so via a file with that values (one per line) that you put in the pipeline filesystem. In this case there will be a dropdown for parameters with a defined value set instead of a simple input for the others:
Just like in the Wait for human action we can define who has the permissions to set these parameters in the options:
Stay tuned for what’s next: Conditional actions
In the near future, the parameters will allow you to do even more. For example, basing on the value of a parameter you can decide whether a defined action should be executed or not.