Job except condition involving refs AND variables is not working as expected
Summary
Job's except: option doesn't behave how the documentation says it should.
Steps to reproduce
Create a project with this .gitlab-ci.yml file:
test-job:
script: echo "I'm being built!"
test-except-d1:
script: echo $DMD
variables:
DMD: 1.081.*
except:
refs:
- /\+d2$/
variables:
- $DMD =~ /^1\./
test-except-d2:
script: echo $DMD
variables:
DMD: 2.071.2.s*
except:
refs:
- /\+d2$/
variables:
- $DMD =~ /^1\./
And do some tags to test the condition.
Example Project
https://gitlab.com/sociomantic-test/gitlab-bug-test
What is the current bug behavior?
-
test-except-d1is not run for the master branch. -
test-except-d1is not run for the v1.0.0 tag. -
test-except-d1andtest-except-d2are not run for the v1.0.0+d2 tag.
What is the expected correct behavior?
According to https://docs.gitlab.com/12.1/ee/ci/yaml/README.html#onlyexcept-advanced I understand this should happen:
-
test-job,test-except-d1andtest-except-d2to be run for themasterbranch. -
test-job,test-except-d1andtest-except-d2to be run for thev1.0.0tag. -
test-jobandtest-except-d2to be run andtest-except-d1not to be run for thev1.0.0+d2tag.
Relevant logs and/or screenshots
None
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
This bug happens on GitLab.com
Results of GitLab application Check
This bug happens on GitLab.com
Possible fixes
No idea.
Edited by Ghost User