Skip to main content
Version: 3.10

Inject Variables Into Deploy Pipelines

KubeRocketCI offers a robust set of features to build highly customizable CI/CD workflows. One of the key features is variable injection, which enables the parametrization of deploy pipelines. This capability is particularly valuable for running multiple automated tests simultaneously and efficiently. Below are some key use cases where variable injection can be beneficial:

  1. Redefining environment-specific configurations.
  2. Securely managing sensitive information such as API keys, tokens, and passwords.
  3. Implementing feature toggles to enable or disable various tasks and checks.
  4. Dynamically configuring application behavior based on deployment contexts.

By leveraging variable injection, developers can ensure smoother deployments, enhance security, and improve operational efficiency.

Prerequisites​

Before proceeding, ensure you have created the following resources:

  1. Codebase;
  2. Deployment Flow;
  3. Environment.

Additionally, customize your deploy pipeline to utilize parameters efficiently. To learn more about creating custom deploy pipelines, read the Customize Deploy Pipeline page.

Add Key-Value Variable​

To add a key-value variable in deploy pipelines, follow the steps below:

  1. Navigate to the KubeRocketCI portal -> Deployment Flows:

Deployment Flows section

  1. Enter your deployment flow and then enter the environment you need to add a variable to. In the environment details page, select the Variables tab. Click the + button to add a variable:

Variables tab

  1. Specify the variables and click Save:

Variables populated

  1. Verify that the deploy pipeline uses your variables:

Variables demonstration