YAML Syntax Description

Job is the basic unit of the Action workflow. A DAG is generated by defining multiple jobs and setting the dependencies of the jobs. The TensorBay workflow engine can automate tasks by executing DAGs. Set the following YAML file as an example.
  1. 1.
    [tasks]: Define all the jobs under this workflow.
  2. 2.
    [tasks.hello-world]: Defines a task, with the name "hello-world".
  3. 3.
    [tasks.hello-world.container]: This job is executed under the docker container.
  4. 4.
    [tasks.hello-world.container.image]: The image used by the docker container is alpine:latest.
  5. 5.
    [tasks.hello-world.container.command]: The command executed in the docker container is 991`called echo.
  6. 6.
    [tasks.hello-world.container.args]: The argument to echo is "hello world".

Runtime Environment of Job

Job supports the following three runtime environments. Each job has only one runtime environment.
1. Container
In this environment you can use a specified image to generate a container and execute it.The job content will be defined by the image.
2. Script
In this environment, a specified script wil be excuted in the docker container.
3. Git
In this environment, a git repo code will be executed inside the docker container.

Job Dependencies

Jobs can define their dependencies by keywords.
A diamond-shaped DAG. Task A executes first, then task B and task C conduct simultaneously. Task D only starts to run when task B and task C are finished.

Parameters Setting of Job

Attributes of Parameters


The name of a parameter, which is used to refer to the parameter in the code of a workflow.


The type of a parameter. The following three types of parameters are supported in Actions now.
  • String: string
  • Number: number, including integers and floating-point numbers
  • Boolean: boolean value, true/false


The default value of a parameter. If the default value is not specified at the beginning, the system will automatically use a preset default value.

Definition of Parameters

Support to view and set the detailed parameters on the parameter details page.

Parameters Setting

Manual Parameters Setting: If a workflow is started manually, then its values can be set via the TensorBay console.
Automatic Parameters Setting: If a workflow is started automatically, then the system will use default values.

How to Quote Parameters

You can quote a parameter in workflow with its name.
  1. 1.
    The parameter to be quoted must be within {{}}.
  2. 2.
    The parameter name must start with workflow.parameters.
  3. 3.
    The parameter name must be the same as the preset one.

Environment Settings of Jobs

Environment defines the environment variables of the container, which can be quoted in the same way as the environment variables of the normal docker container.