Working with environment variables

Our recommended approach for abstracting sensitive information like passwords, keys, etc is to use the key-value integration.

However, there are times when you just want to encrypt something so you can use it in your yml, for example in your shippable.yml or configuring a params resource.

Encrypting information

  • From the left navbar, select your Subscription.

Add Account Integration

  • On the Subscription page, click on the Gears icon and click on Settings. You'll be taken to the Settings page.

  • Go to the Encrypt section. Enter your variables in the text box and click on Encrypt. This will give you the encrypted string that you can use in your yml.

Encrypt Environment Variables

You can then include the encrypted string in your yml using the secure tag. The variables are then available during your build:

As an example, you can use the encrypted variable in shippable.yml as shown below:

  - secure: <encrypted output>

    - echo $FOO  

Decrypting an encrypted string

Owners of a subscription can decrypt an encrypted string through the Decrypt section of Subscription settings.