Batch contexts
Last updated
Was this helpful?
Last updated
Was this helpful?
This page describes contexts the can use in expressions for calculating YAML attribute values.
flow
project
params
env
tags
volumes
images
strategy
matrix
needs
git
flow
contextThe flow
context contains information about the workflow: its ID, title, etc.
flow.flow_id
str
flow.project_id
str
flow.workspace
LocalPath
A path to the workspace (the root folder of the flow).
flow.title
str
flow.username
str
Name of user who executed the workflow run.
project
contextThe project
context contains information about the project: its ID, owner, etc.
project.id
str
project.owner
str
project.project_name
str
params
contextparams.<param-name>
str
The value of a specific parameter.
env
contextThe 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.
env.<env-name>
str
The value of a specific environment variable.
tags
contextA set of job tags.
tags
set[str]
This context changes for each job. You can access this context from any job.
volumes
contextvolumes.<volume-id>.id
str
volumes.<volume-id>.remote
URL
volumes.<volume-id>.mount
RemotePath
The path inside a job by which the volume should be mounted.
volumes.<volume-id>.read_only
bool
True
if the volume is mounted in read-only mode, False
otherwise.
volumes.<volume-id>.local
None
In batch workflows, this property is always None
.
volumes.<volume-id>.full_local_path
LocalPath
or None
Full version of local
property.
volumes.<volume-id>.ref
str
The value is assembled from the remote
, mount
, and read_only
properties.
volumes.<volume-id>.ref_ro
str
Like ref
but read-only mode is enforced.
volumes.<volume-id>.ref_rw
str
Like ref
but read-write mode is enforced.
images
contextimages.<image-id>.id
str
images.<image-id>.ref
str
images.<image-id>.context
None
In batch workflows, this property is always None
.
images.<image-id>.full_context_path
None
In batch workflows, this property is always None
.
images.<image-id>.dockerfile
None
In batch workflows, this property is always None
.
images.<image-id>.full_dockerfile_path
None
In batch workflows, this property is always None
.
images.<image-id>.build_args
list[str]
In batch workflows, this property is always []
(empty list).
images.<image-id>.env
dict[str, str]
In batch workflows, this property is always {}
(empty dict).
images.<image-id>.volumes
list[str]
In batch workflows, this property is always []
(empty list).
strategy
contextstrategy.fail_fast
bool
strategy.max_parallel
int
matrix
contextmatrix.<param-name>
bool
or int
or float
or str
or None
The matrix parameter value for the current combination.
needs
contextneeds.<task-id>.result
str
State of the completed task <task-id>
. Can be one of the following: "succedded"
, "failed"
, "cancelled"
, "skipped"
.
needs.<task-id>.outputs.<output-name>
str
The value of the <output-name>
output produced by the <task-id>
task.
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.
git.sha
str
SHA of the current commit.
git.branch
str
Name of the current branch.
git.tags
list[str]
List of tags that point to the current commit.
Information about the main workflow settings, defaults, etc. See for details.
Information about the project. See for details.
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 for details.
Contains a mapping of volume definitions. For more information, see .
Contains a mapping of docker images from . See for details.
Contains information about strategies from . See for details.
Contains combination data generated by the . See for details.
Contains outputs generated by tasks from . See for details.
A mapping of the flow's workspace to a git repository. For more information, see .
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 attribute.
The project's ID. It is automatically generated based on the name of the flow folder. You can override it using attribute. Check for details.
The workflow's title. Set the attribute to override the auto-calculated value.
The project's ID. It is automatically generated based on the name of the flow folder. You can override it using attribute. Check for details. This context property is an alias to flow.project_id
.
The project's owner. See also: .
The platform project name. Set the attribute to override the auto-calculated value.
Parameter described in the .
The env
context contains environment variables that have been set in the . For more information about setting environment variables in your workflow, see "."
Tags available in this context are combined from system tags (project:<project-id>
, flow:<flow-id>
, task:<task-id>
), and flow default tags (see ).
Contains information about volumes defined in the of a batch workflow.
The volume definition identifier. For more information, see .
Remote volume URI, e.g. storage:path/to
.
For more information, see .
For more information, see .
For more information, see .
A volume reference that can be used as a . The calculated value looks like storage:path/to:/mnt/path:rw
.
Contains information about images defined in the of a batch workflow.
The image definition identifier. For more information, see section.
The image reference. For more information, see attribute.
Contains information about some strategies of execution set in the .
Task failure processing strategy. For more information, see attribute.
The maximum number of tasks that can be executed at the same time. For more information, see attribute.
Contains parameters from a combination generated by the attribute.
Contains outputs generated by tasks that were specified in the attribute. Refer to the reference to learn how to generate outputs.