Commit 3a123614 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'bprescott-allowedtofail2-20200206' into 'master'

docs: CI rules: manual does not set 'allowed to fail' automatically

See merge request gitlab-org/gitlab!24589
parents 406f3663 a5204747
...@@ -1264,7 +1264,9 @@ osx job: ...@@ -1264,7 +1264,9 @@ osx job:
`allow_failure` allows a job to fail without impacting the rest of the CI `allow_failure` allows a job to fail without impacting the rest of the CI
suite. suite.
The default value is `false`, except for [manual](#whenmanual) jobs. The default value is `false`, except for [manual](#whenmanual) jobs using the
`when: manual` syntax, unless using [`rules:`](#rules) syntax, where all jobs
default to false, *including* `when: manual` jobs.
When enabled and the job fails, the job will show an orange warning in the UI. When enabled and the job fails, the job will show an orange warning in the UI.
However, the logical flow of the pipeline will consider the job a However, the logical flow of the pipeline will consider the job a
...@@ -1379,14 +1381,17 @@ manual action by clicking a _play_ button. ...@@ -1379,14 +1381,17 @@ manual action by clicking a _play_ button.
When a pipeline is blocked, it will not be merged if Merge When Pipeline Succeeds When a pipeline is blocked, it will not be merged if Merge When Pipeline Succeeds
is set. Blocked pipelines also do have a special status, called _manual_. is set. Blocked pipelines also do have a special status, called _manual_.
Manual actions are non-blocking by default. If you want to make manual action When the `when:manual` syntax is used, manual actions are non-blocking by
blocking, it is necessary to add `allow_failure: false` to the job's definition default. If you want to make manual action blocking, it is necessary to add
in `.gitlab-ci.yml`. `allow_failure: false` to the job's definition in `.gitlab-ci.yml`.
Optional manual actions have `allow_failure: true` set by default and their Optional manual actions have `allow_failure: true` set by default and their
Statuses do not contribute to the overall pipeline status. So, if a manual Statuses do not contribute to the overall pipeline status. So, if a manual
action fails, the pipeline will eventually succeed. action fails, the pipeline will eventually succeed.
NOTE: **Note:**
When using [`rules:`](#rules), `allow_failure` defaults to `false`, including for manual jobs.
Manual actions are considered to be write actions, so permissions for Manual actions are considered to be write actions, so permissions for
[protected branches](../../user/project/protected_branches.md) are used when [protected branches](../../user/project/protected_branches.md) are used when
a user wants to trigger an action. In other words, in order to trigger a manual a user wants to trigger an action. In other words, in order to trigger a manual
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment