Job settings
What you can change in a job's side panel, and how it looks in YAML
Click a job in the graph to open its side panel. The tabs depend on the job type.
| Tab | Settings |
|---|---|
| Overview | Job name, type (Build, Deploy, Approval, Custom) |
| Deploy (deploy jobs only) | Service, image, environment, Deploy after approval |
| Advanced | Run condition, Timeout, On failure, If the deploy fails, Prevent concurrent runs, Don't check out code |
Deploy jobs
Pick a Service and an Environment. For the image, use Pick a built image to choose an image built by a build job in this pipeline.
To choose the service or environment each time you run, pick Runtime input. It becomes a run input, and the value you picked before switching becomes its default. If the pipeline also runs on push, CR or schedule, pick a value first and then choose Runtime input.
Turn on Deploy after approval to make the deploy wait for approval first. See Deploy after approval.
Advanced tab
| Setting | Options | Behavior |
|---|---|---|
| Run condition | Previous succeeded (default), Previous failed, Always, When conditions match | Jobs after a job skipped by its condition are skipped too. A job set to Always still runs. |
| Timeout | 10 min, 30 min, 1 hour, 2 hours, Custom | The job fails when it runs past the limit. If you leave it unset, the default time is shown as selected. |
| On failure | Stop (default), Retry, Ignore and continue | Retry also asks for a retry count. With Ignore and continue, later jobs run and the run ends as succeeded. |
| If the deploy fails | Roll back (default), Keep as is | Roll back restores the previous version. Existing Pods keep serving while it rolls back. |
| Prevent concurrent runs | Off (default), a group name | Only one job in a group runs at a time. A later run waits until the earlier one finishes. |
| Don't check out code | On, off | The job starts without checking out the repository. |
With When conditions match, you build the condition by picking a branch, a tag or how the run started (push, change request, schedule, manual run). To type the expression yourself, click Write expression.
Choosing where a value comes from
Next to a value field, Choose a value lets you pick where the value comes from.
| Option | Behavior |
|---|---|
| Write it | Uses what you type as is |
| Decide at run | Declares a run input for you and takes the value when the pipeline runs |
| From an earlier step | Uses an output of an earlier job or step, such as the digest of a built image |
Editing in YAML
Common forms when you edit in the YAML view:
| To do this | Write |
|---|---|
| Run after another job | needs: [build] |
| Run condition | if: branch == 'main', if: inputs.target == 'prod', if: failure(), if: always() |
| Timeout | timeout-minutes: 10 |
| Retry on failure | on-failure: [{action: retry, retry: {count: 3}}] |
| Continue on failure | on-failure: [{action: ignore}] |
| Keep a failed deploy as is | on_failure: keep under the deployment settings |
| Prevent concurrent runs | resource-group: <name> |
| Use an earlier job's output | ${{ needs.build.outputs.digest }} |
| Build the repository at a tag | codebase: {repository: …, build: {type: tag, value: …}} |
Run condition expressions compare collabops.* (ref, event_name and so on), branch and declared inputs.* against quoted strings with == or !=. Only declared inputs can be used as inputs.*.