`allow_failure` default value with `rules` is unclear
Summary
Note: This is possibly a "bug" in our documentation, and not per se in the product itself.
We currently document the following behaviour of allow_failure
in doc/ci/yaml/index.md#L561-565:
The default value for `allow_failure` is:
- `true` for [manual jobs](../jobs/job_control.md#create-a-job-that-must-be-run-manually).
- `false` for manual jobs that also use [`rules`](#rules).
- `false` in all other cases.
false
for manual jobs that also userules
.
It is not clear what the context is.
Is this referencing when: manual
and allow_failure
that is nested within a rules
block, or
is this referencing when: manual
and allow_failure
in a job's top level block?
When configured in a job's top level, the default value for allow_failure
is true
for manual jobs, regardless of any rules
Steps to reproduce
stages:
- a
- b
job1:
stage: a
script:
- this will fail
when: manual
rules:
- exists:
- .gitlab-ci.yml
job2:
stage: b
script:
- echo "job 2"
https://gitlab.com/nelbacha/demo-default-value-for-allow_failure/-/pipelines/537302873
diff: allow_failure: false
stages:
- a
- b
job1:
stage: a
script:
- this will fail
when: manual
rules:
- exists:
- .gitlab-ci.yml
allow_failure: false
job2:
stage: b
script:
- echo "job 2"
https://gitlab.com/nelbacha/demo-default-value-for-allow_failure/-/pipelines/537303991
Example Project
https://gitlab.com/nelbacha/demo-default-value-for-allow_failure
What is the current bug behavior?
Documentation states allow_failure
default value is false
, for manual
jobs with rules
What is the expected correct behavior?
tbd
Relevant logs and/or screenshots
See steps to reproduce
Output of checks
This bug happens on GitLab.com