Skip to content

Commit 2bc37f6

Browse files
author
kencx
committed
til 20260310
1 parent e90f4f7 commit 2bc37f6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
+++
2+
title = "The difference between optional and blocking manual jobs in GitLab CI"
3+
date = "2026-03-10"
4+
updated = "2026-03-10"
5+
6+
[taxonomies]
7+
tags = ["gitlab", "ci/cd"]
8+
+++
9+
10+
To create an optional job in GitLab CI, add `when: manual` to the job
11+
configuration. However, the location of `when: manual` determines the type of
12+
manual job created:
13+
14+
- If defined outside `rules`, the job will default to `allow_failure: true`,
15+
making it optional. In this case, the pipeline can succeed - subsequent jobs
16+
can continue to run - if the manual job is not run or fails.
17+
- If defined inside `rules`, the job defaults to `allow_failure: false`, making
18+
it blocking. The pipeline will stop at the stage where the job is defined. The
19+
blocking manual job must be run for the rest of the pipeline to proceed.
20+
21+
## References
22+
- [GitLab - Job Control](https://docs.gitlab.com/ci/jobs/job_control/#types-of-manual-jobs)

0 commit comments

Comments
 (0)