Batch contexts
This page describes contexts the Batch workflow can use in expressions for calculating YAML attribute values.
Batch Contexts
Context name | Description |
---|---|
| Information about the main workflow settings, defaults, etc. See |
| Information about the project. See |
| A mapping of global workflow parameters. For more information, see |
| Contains environment variables set in workflow defaults. For more information, see |
| A set of job tags set in workflow defaults. See |
| Contains a mapping of volume definitions. For more information, see |
| Contains a mapping of docker images from workflow config. See |
| Contains information about strategies from flow defaults. See |
| Contains combination data generated by the |
| Contains outputs generated by tasks from |
| A mapping of the flow's workspace to a git repository. For more information, see |
flow
context
flow
contextThe flow
context contains information about the workflow: its ID, title, etc.
Property name | Type | Description |
---|---|---|
|
| The workflow's ID. It is automatically generated based on the workflow's YAML filename with a dropped suffix. You can override the property by setting the |
|
| The project's ID. It is automatically generated based on the name of the flow folder. You can override it using |
|
| A path to the workspace (the root folder of the flow). |
|
| The workflow's title. Set the |
project
context
project
contextThe project
context contains information about the project: its ID, owner, etc.
Property name | Type | Description |
---|---|---|
|
| The project's ID. It is automatically generated based on the name of the flow folder. You can override it using |
|
| The project's owner. See also: the project configuration. |
|
| The platform project name. Set the project.project_name attribute to override the auto-calculated value. |
params
context
params
contextParameter described in the params
attribute .
Property name | Type | Description |
---|---|---|
|
| The value of a specific parameter. |
env
context
env
contextThe env
context contains environment variables that have been set in the workflow defaults. For more information about setting environment variables in your workflow, see "Batch workflow syntax."
The env
context syntax allows you to use the value of an environment variable in your workflow file. If you want to use the value of an environment variable inside a job, use your operating system's standard method for reading environment variables.
Property name | Type | Description |
---|---|---|
|
| The value of a specific environment variable. |
tags
context
tags
contextA set of job tags.
Tags available in this context are combined from system tags (project:<project-id>
, flow:<flow-id>
, task:<task-id>
), and flow default tags (see defaults.tags
attribute).
Property name | Type | Description |
---|---|---|
|
| This context changes for each job. You can access this context from any job. |
volumes
context
volumes
contextContains information about volumes defined in the volumes
section of a batch workflow.
Property name | Type | Description |
---|---|---|
|
| The volume definition identifier. For more information, see |
|
| Remote volume URI, e.g. |
|
| The path inside a job by which the volume should be mounted. For more information, see |
|
|
For more information, see |
|
| In batch workflows, this property is always |
|
| Full version of |
|
| A volume reference that can be used as a The value is assembled from the |
|
| Like |
|
| Like |
images
context
images
contextContains information about images defined in the images
section of a batch workflow.
Property name | Type | Description |
---|---|---|
|
| The image definition identifier. For more information, see |
|
| The image reference. For more information, see |
|
| In batch workflows, this property is always |
|
| In batch workflows, this property is always |
|
| In batch workflows, this property is always |
|
| In batch workflows, this property is always |
|
| In batch workflows, this property is always |
|
| In batch workflows, this property is always |
|
| In batch workflows, this property is always |
strategy
context
strategy
contextContains information about some strategies of execution set in the flow defaults.
Property name | Type | Description |
---|---|---|
|
| Task failure processing strategy. For more information, see |
|
| The maximum number of tasks that can be executed at the same time. For more information, see |
matrix
context
matrix
contextContains parameters from a combination generated by the tasks.strategy.matrix
attribute.
Property name | Type | Description |
---|---|---|
|
| The matrix parameter value for the current combination. |
needs
context
needs
contextContains outputs generated by tasks that were specified in the tasks.needs
attribute. Refer to the set-output
command reference to learn how to generate outputs.
Property name | Type | Description |
---|---|---|
|
| State of the completed task |
|
| The value of the |
git
context
git
contextThe git
context contains a mapping of your flow's workspace to a git repository.
This context can only be used if the flow's workspace is inside some git repository.
Property name | Type | Description |
---|---|---|
|
| SHA of the current commit. |
|
| Name of the current branch. |
|
| List of tags that point to the current commit. |
Last updated