Jobs and Steps
Job
A job is a defined task consisting of steps. The simplest automation script consists of a single job and, in turn, the simplest job consists of a single step.
Step
The most basic Automation unit is the step. A step is the smallest possible building block of the automation script, and it answers two questions: What to run (e.g., a shell script or Kotlin code) and where to run it? You cannot use steps on their own, but only as parts of jobs.
Step types
The step type defines the execution environment for the step. There are two types of steps in Automation:
host
Runs on a virtual machine (worker) in Space Automation cloud or on a self-hosted worker.
Lets you run multiple scripts (
kotlinScript
andshellScript
) in a single block. These scripts run sequentially. As they are run on the same machine, they share the same file system.
container
Runs in a Docker container inside a worker (cloud or self-hosted).
Lets you run only one script (
kotlinScript
andshellScript
) in a single block.
For example:
File system
Each step runs in a new environment. This means that each step has its own file system with a fresh copy of the project sources. That's why if you need to run various scripts (e.g.,
kotlinScript
andshellScript
) in a single step, prefer using thehost
step type.You can also share files between steps.
Learn more about the file system in a container and in a worker.
Parallel and sequential execution
All jobs within a script run in parallel.
Steps within a job can be run in sequence and in parallel.
Job triggers
A job run can be triggered by a project event. By default, it's 'git push'. You can also run jobs manually.
A job can have various failure conditions.
Limits
A script can contain up to 100 jobs and each job can contain up to 50 steps.
The default and maximum allowed job timeout is 2 hours.