Live contexts
This page describes the contexts a live workflow can use in expressions for calculating YAML attribute values.
Live Contexts
env
flow
project
images
multi
params
tags
volumes
git
env
context
env
contextThe env
context contains environment variables that have been set in a workflow or a job. For more information about setting environment variables in your workflow, see "Live 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.
env.<env-name>
str
The value of a specific environment variable.
flow
context
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
context
project
contextThe project
context contains information about the project: its ID, owner, etc.
project.id
str
project.owner
str
project.project_name
str
images
context
images
contextContains information about images defined in the images
section of a live workflow.
images.<image-id>.id
str
images.<image-id>.ref
str
images.<image-id>.context
LocalPath
or None
The context directory used for building the image or None
if the context is not set. The path is relative to the flow's root (flow.workspace
property).
images.<image-id>.full_context_path
LocalPath
or None
The absolute path, pointing to the context
folder if set.
images.<image-id>.dockerfile
LocalPath
or None
A path to Dockerfile
or None
if not set.
images.<image-id>.full_dockerfile_path
LocalPath
or None
Full version of the dockerfile
attribute.
images.<image-id>.build_args
list[str]
A sequence of additional build arguments.
images.<image-id>.env
dict[str, str]
Environment variables passed to the image builder.
images.<image-id>.volumes
list[str]
A sequence of volume definitions passed to the image builder.
multi
context
multi
contextThe additional arguments passed to multi-job.
multi.args
str
Additional command line arguments passed to multi-job.
The command line run defines the field as apolo-flow run <job-id> -- <args>
.
multi.suffix
str
params
context
params
contextParameter described in the jobs.<job-id>.params
attribute and available for substitution - for example, in jobs.<job-id>.cmd
calculation.
params.<param-name>
str
The value of a specific parameter.
Supported parameter values: project
, flow
, env
, tags
, volumes
, images
.
tags
context
tags
contextA set of job tags.
Tags are combined from system tags (project:<project-id>
, job:<job-id>
), flow default tags (see defaults.tags
attribute), and job-specific tags (see jobs.<job-id>.tags
attribute).
tags
set[str]
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 live workflow.
volumes.<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
LocalPath
or None
A path in the workspace folder to synchronize with remote Apolo storage or None
if not set.
volumes.<volume-id>.full_local_path
LocalPath
or None
Full version of local
property.
volumes.<volume-id>.ref
str
The value is assembled from 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.
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.
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.
Last updated