a manual job caused by rules is blocking for the complete pipeline
Manual fix
Adding allow_failure: true
will manually fix this behavior
Created a MR: !24605 (merged)
That will not fix this "bug", but allow users to have this configuration:
job:
script: "echo Hello, Rules!"
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
when: manual # adding this line will fix the inconsistency of manual job in rules
allow_failure: true
More explanation about it is in the MR description.
Summary
When a rule determines a step is manual, that manual step is blocking.
Steps to reproduce
Add the rules keyword, with a default that results in a when: manual.
Example Project
https://gitlab.com/polleke_db/rules-test/pipelines/102327048
What is the current bug behavior?
The job is considered manual because of the rules. But that job is also blocking for the pipeline.
What is the expected correct behavior?
A manual job should always be considered as passed.
Relevant logs and/or screenshots
stages:
- CodeQuality
- Build
- Test
- Deploy
cppcheck:
stage: CodeQuality
script:
- echo cppcheck
only:
- merge_requests
Release:
stage: Build
script:
- echo "REL build"
only:
- merge_requests
Debug:
stage: Build
script:
- echo DBG build
when:
manual
only:
- merge_requests
Unit test Rel:
stage: Test
script:
- echo REL unit tests
only:
- merge_requests
Unit test Dbg:
stage: Test
script:
- echo DBG unit tests
when:
manual
only:
- merge_requests
Unit test 690:
stage: Test
script:
- echo DBG unit tests
rules:
- changes:
- OMP/**/*
when: on_success
- when: manual
Output of checks
This bug happens on GitLab.com and on our gitlab CE 12.3.6-ee
Results of GitLab environment info
Expand for output related to GitLab environment info
Results of GitLab application Check
Expand for output related to the GitLab application check
Possible fixes
Edited by Dov Hershkovitch