integration resource is used to represent credentials that have been encrypted using Shippable Integrations.

You can create a integration resource by adding it to shippable.resources.yml

  - name:           <string>
    type:           integration
    integration:    <string>
  • name -- should be an easy to remember text string

  • type -- is set to integration

  • integration -- name of the subscription integration. All Shippable Integrations can be used here

Used in Jobs

This resource is used as an IN for the following jobs

Default Environment Variables

Whenever integration is used as an IN or OUT for a job that can execute user defined scripts, a set of environment variables are configured by the platform that may be useful to set the context before user defined scripts execute as part of the job. These variables are available when this resource is used.

<NAME> is the the friendly name of the resource.

Environment variable Description
<NAME>_NAME The name of the resource.
<NAME>_ID The ID of the resource.
<NAME>_TYPE The type of the resource. In this case integration.
<NAME>_INTEGRATION_<FIELDNAME> Values from the integration that was used. More info on the specific integration page.
<NAME>_PATH The directory containing files for the resource.
<NAME>_OPERATION The operation of the resource; either IN or OUT.
<NAME>_VERSIONID The ID of the version of the resource being used.
<NAME>_VERSIONNUMBER The number of the version of the resource being used.

Some special cases depending on the integration used

  • If the integration is of type Key-Value pair, the key-values are exported as-is without adding RESOURCENAME_INTEGRATION_ in the key name. They act like params resources, but are stored encrypted for security reasons.

  • If the integration of type ssh-key or pem-key is used, the environment variable will mess up the key structure due to carriage returns. Hence the platform will extract the private key into a file and puts the location in the environment variable below.

    Environment variable Description
    <NAME>_KEYPATH points directly to the private key file.

Shippable Utility Functions

To make it easy to use these environment variables, the platform provides a command line utility that can be used to work with these values.

How to use these utility functions is documented here.

Further Reading