ops.yml Reference Manual
This is the configuration reference for
ops.yml files. On this page, you will find a description of the structure of a typical
ops.yml file, as well as the meaning of each configuration option that you can specify in that file.
Default values are used for all options that are omitted from an
This page is intended as a reference document to explain the usage and meaning of each element that can be included in an
ops.yml file to configure a workflow on the CTO.ai platform.
For a better understanding of how an
ops.yml file is used to build a container image for running your workflow, you should review our ops.yml Overview documentation.
If you are new to the CTO.ai platform, you can skip ahead to the next section on this page. If you already have experience writing
ops.yml files to define CTO.ai workflows, you might find the condensed reference YAML file below useful.
The file in the following code box documents the structure of an
ops.yml file and every (non-legacy) key that may be present, as well as very brief description of the expected value for each key. Deeper explanations of every element can be found in the following sections of this page.
The following keys exist at the top level of the YAML file’s hierarchy.
The syntax version of this
ops.yml file itself. This is not the workflow’s version number.
services keys are each optional, but at least one of them must be included for an
ops.yml configuration to result in a runnable workflow.
Array of YAML objects defining one or more individual Commands workflows.
Array of YAML objects defining one or more individual Pipelines workflows.
Array of YAML objects defining one or more individual Services workflows.
The configuration options shown in the box below are applicable to all three kinds of workflows offered by the CTO.ai platform: Commands, Pipelines, and Services.
String uniquely identifying the workflow and its version. This setting is required.
The user-friendly name for a workflow and the workflow’s version should be separated by a colon (
:). This value will be used to tag the container image built to run this workflow.
String describing the intended purpose or usage of this workflow. This setting is required.
A mapping with three valid keys:
configs. Each of these keys can have under it an array of one or more strings specifying the environment variables to pass to the workflow.
For a detailed explanation of how this feature can be used, have a look at the Configuring Workflow Behavior with Environment Variables section on our ops.yml Overview page.
Array of strings defining environment variables to pass to the workflow’s runtime environment.
Array of strings specifying which keys from the team’s Secrets Store should have their value made available as environment variables in the workflow’s runtime environment. If a specified value doesn’t exist in the Secrets Store, the environment variable will be set with an empty string as its value.
Array of strings specifying which keys from the team’s Configs Store should have their value made available as environment variables in the workflow’s runtime environment. If a specified value doesn’t exist in the Configs Store, the environment variable will be set with an empty string as its value.
Array of strings defining the events that should trigger this workflow to run. This setting is optional.
The following configuration options are applicable to definitions for the two kinds of workflows offered by the CTO.ai platform that can be described as self-contained: Commands and Services.
String containing the shell command to execute in the workflow container to initiate the workflow. This setting is required.
This value will be used as the
ENTRYPOINT of the container image built for this workflow.
The configuration options in this section are applicable to definitions of Services workflows only.
The port used to access the application deployed by the Services workflow.
The domain name optionally configured to serve the application deployed by the Services workflow, via CNAME records.
Array of strings defining which operations to perform on your Services workflow when an
event occurs. Valid values are
This section is applicable to the
jobs defined by Pipelines workflows.
Setting them apart from the other workflow types offered by the CTO.ai platform, Services workflows include their application logic in one or more Jobs that are executed in sequence.
Array of one or more mappings that define the individual Jobs to be executed.
Many of these fields are identical to the expected fields for other types of individual workflows, including the
description fields. The other fields that can be used to define a Job are described below.
Array of package names to be installed by the system package manager.
Array of strings defining the sequence of shell commands to execute within the Job’s runtime container.
This section is only applicable to workflows running on your local machine, not running remotely on the CTO.ai platform. The configuration options described in this section are provided to help you more easily develop your workflows locally.
Boolean value (default:
false) that, if set to
true, will bind the host’s current working directory to the
/cwd path within the running workflow container.
Boolean value (default:
false) that, if set to
true, will bind the host’s home directory to the
/root path within the running workflow container.
Boolean value specifying whether a workflow should be made visible in our Public Registry. Defaults to
Legacy setting that allows you to specify a link to a public GitHub repo or Markdown file, which will be used as the README for your workflow on our Public Registry.
Boolean value specifying whether a workflow is allowed to run remotely (
remote: true) or if it may only be run locally (
remote: false). Defaults to
Legacy value specifying the version of the CTO.ai SDK to use. Defaults to
2. This option is deprecated.