params
are an optional configuration of the task schema. tasks#params
A key-value mapping of string keys and values that are exposed to the task via environment variables.
task: env
config:
platform: linux
image_resource:
type: registry-image
source:
repository: alpine
params:
VALUE: something
run:
path: sh
args:
- -c
- echo $VALUE
vars
can be used in most parts of the task configuration. vars
Aside from credentials, vars may also be used for generic parameterization of pipeline configuration templates, allowing a single pipeline config file to be configured multiple times with different parameters - e.g. ((branch_name)).
task: env
config:
platform: linux
image_resource:
type: registry-image
source:
repository: my-image
tag: ((branch_name))
params:
BRANCH_NAME: ((branch_name))
run:
path: sh
args:
- -c
- echo $BRANCH_NAME; echo 'can also be interpolated here: ((branch_name))'