TL;DR: ContinuousPipe’s variables can be promoted to environment variables through the UI or a YAML line.
The most common and recommended way of injecting configuration into a running container is through environment variables. When using ContinuousPipe, you can use variables within the configuration files to reduce duplication, use conditional values, or even use encrypted values.
But there are two aspects to consider here:
- For newcomers, the difference between these variables and the environment variables is not clear
- Passing variables to environment variable requires a lot of configuration lines
As a result, we’ve decided to add a new feature to ContinuousPipe that allows you to automatically promote a variable to an environment variable for all or some of your containers. You can now change the ‘promotion status’ of the variable directly within the user interface.
As the user interface is a YAML generator, this feature is available within any YAML file:
# This variable will be accessible to every container
- name: DATABASE_URL
# This variable will be accessible only for the "api" and "worker"
- name: SECRET
as_environment_variable: ['api', 'worker']