Knowledge

How to use environment variables?

Environment variables are pairs of key-and-value that can be used in Buddy pipelines instead of manually updating the same values across the system on every change. They are most commonly used for authentication credentials, allowing developers to save time looking up and entering access details and eliminating the risk of providing sensitive details in their scripts.

Please mind you need to be an admin to edit environment variables

Example usage

Let's use the variables to encrypt access to an FTP server:

  1. Go to your deployment pipeline and click the Variables tab
  2. Add variables the with corresponding values. For example:

    • Hostname: FTP_HOST / 192.168.0.100
    • Login: FTP_LOGIN / admin
    • Password: FTP_PASS / buddy1234

    Always choose strong passwords for your credentials. You can also encrypt values so they won’t be presented in plain text.

    If you use SSH, you can store your keys as variables, too.

    Configuring environment variables
    Configuring environment variables
  3. Go back to your pipeline and click the upload action

  4. Enter the variables in the corresponding inputs in the following format: ${VARIABLE}.

    Hostnmame: ${FTP_HOST}
    Login: ${FTP_LOGIN}
    Password: ${FTP_PASS}

    Buddy will automatically suggest the variables once you start typing.

    Using variables in action
    Using variables in action
  5. Click Test connection to see if everything's been configured correctly.

Hierarchy Tiers

The variables are divided into three tiers:

  1. Workspace (available from DashboardPreferences)
  2. Project (available from Project options)
  3. Pipeline (available from pipeline overview)

Each subsequent tier will overwrite the values from the previous tier.

Workspace environment variables
Workspace environment variables

Use Cases

Get started now

14 days of unlimited trial. No credit card required.