CI: Variables not evaluated in "rules:changes" values
Summary
When I use the rules:changes
with a path containing a variable, the rule is not handled properly.
Steps to reproduce
File structure:
client/
server/
-
.gitlab-ci.yml
as follows:
.common: &common
before_script:
- cd $PACKAGE
rules:
- changes
- $PACKAGE/**/*
when: always
- when: never
artifacts:
- paths:
- $PACKAGE
build_client:
script: echo "Building client..."
variables:
PACKAGE: client
build_server:
script: echo "Building server..."
variables:
PACKAGE: server
Steps to reproduce:
- Add a file in
/client
or/server
. - Push the change to the server.
Example Project
(None.)
What is the current bug behavior?
The corresponding job does not run, despite changes in the corresponding path.
What is the expected correct behavior?
The corresponding job should run.
Relevant logs and/or screenshots
(None.)
Output of checks
(None.)
Results of GitLab environment info
GitLab 12.9.2
Results of GitLab application Check
(n/a)
Possible fixes
(Not sure.)
Edited by Claas Augner