params resource stores user defined key-value pairs. This can be then be injected into a job runtime environment where your DevOps activity runs or can set environment variables of your deploy target (VMs or containers).
You can create a
params resource by adding it to
resources: - name: <string> type: params version: <object>
name-- should be an easy to remember text string
type-- is set to
version-- is an object that contains specific properties that apply to this resource. A new version is created any time this section of the YML changes.
version: params: KEY1: "value1" #requires at least one KEY2: "value2" #optional secure: <encrypted value> #optional
You can use secure variables to encrypt any key-value pairs that contain sensitive information you don't want to expose as plain text.
Used in Jobs
This resource is used as an
IN for the following jobs
Default Environment Variables
params is used as an
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.
||The name of the resource.|
||The ID of the resource.|
||The type of the resource. In this case
||The operation of the resource; either
||The directory containing files for the resource.|
||SourceName defined in the pointer.|
||The ID of the version of the resource being used.|
||The number of the version of the resource being used.|
|KEY1||params section of the version is parsed and values are sourced. From above, e.g., KEY1 will be set to
|KEY2||params section of the version is parsed and values are sourced. From above, e.g., KEY2 will be set to
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.