Support variables in rules: exists
What does this MR do and why?
Support variable expansion in rules: exists
. This change is under the feature flag ci_variable_expansion_in_rules_exists
.
Screenshots or screen recordings
When the rules match:
variables:
PATTERN: '*.yml'
WRONG_PATH: 'wrong.rb'
rule_exist_job:
script:
- echo $PATTERN
- echo $WRONG_PATH
- echo $EXIST_PATH
rules:
- exists:
- $PATTERN
In the example above, we have an existing deploy.yml
file, so the rule_exist_job
runs:
When the rules do not match:
variables:
PATTERN: '*.yml'
EXIST_PATH: 'upload.yml'
WRONG_PATH: 'wrong.rb'
rule_exist_job:
script:
- echo $PATTERN
- echo $WRONG_PATH
- echo $EXIST_PATH
rules:
- exists:
- $PATTERN
There are no jobs for this pipeline:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to: #283881 (closed)
Rollout issue: #381046 (closed)
Merge request reports
Activity
- A deleted user
added backend label
1 Warning ⚠ 60a42745: The commit subject must contain at least 3 words. For more information, take a look at our Commit message guidelines. 2 Messages 📖 CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
📖 This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/ci/variables/where_variables_can_be_used.md
(Link to current live version) -
doc/ci/yaml/index.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Corinna Gogolok (
@cwiesner
) (UTC+1, same timezone as@lauraX
)Mayra Cabrera (
@mayra-cabrera
) (UTC-6, 7 hours behind@lauraX
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
🔁 danger-review
job that generated this comment.Generated by
🚫 DangerEdited by Ghost User-
- Resolved by 🤖 GitLab Bot 🤖
Proper labels assigned to this merge request. Please ignore me.
👋 @lauraX - please see the following guidance and update this merge request.1 Error, 1 Warning ❌ Please add typebug typefeature, or typemaintenance label to this merge request. ⚠ Please add a subtype label to this merge request. If you have added a type label and do not feel the purpose of this merge request matches one of the subtypes labels, please resolve this discussion.
Edited by 🤖 GitLab Bot 🤖
Allure report
allure-report-publisher
generated test report!e2e-review-qa:
❗ test report for cc571137expand test summary
+-----------------------------------------------------------------------------------------+ | suites summary | +------------------------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------------------------+--------+--------+---------+-------+-------+--------+ | Verify | 43 | 0 | 8 | 9 | 51 | ❗ | | Create | 28 | 0 | 1 | 0 | 29 | ✅ | | Manage | 43 | 0 | 3 | 7 | 46 | ❗ | | Plan | 49 | 0 | 1 | 0 | 50 | ✅ | | Feature flag handler sanity checks | 9 | 0 | 0 | 0 | 9 | ✅ | | Govern | 10 | 0 | 5 | 0 | 15 | ✅ | | Version sanity check | 0 | 0 | 1 | 0 | 1 | ➖ | | Configure | 0 | 0 | 1 | 0 | 1 | ➖ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------------------------+--------+--------+---------+-------+-------+--------+ | Total | 182 | 0 | 21 | 16 | 203 | ❗ | +------------------------------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
❌ test report for cc571137expand test summary
+---------------------------------------------------------------------------+ | suites summary | +----------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------------+--------+--------+---------+-------+-------+--------+ | Verify | 86 | 0 | 16 | 0 | 102 | ✅ | | Manage | 135 | 1 | 26 | 2 | 162 | ❌ | | Create | 318 | 0 | 10 | 2 | 328 | ❗ | | Package | 0 | 0 | 6 | 0 | 6 | ➖ | | Plan | 120 | 0 | 0 | 0 | 120 | ✅ | | Fulfillment | 4 | 0 | 30 | 0 | 34 | ✅ | | Govern | 82 | 0 | 0 | 2 | 82 | ❗ | | Analytics | 4 | 0 | 0 | 0 | 4 | ✅ | | Configure | 0 | 0 | 6 | 0 | 6 | ➖ | | Release | 10 | 0 | 0 | 0 | 10 | ✅ | | Secure | 14 | 0 | 2 | 2 | 16 | ❗ | | ModelOps | 0 | 0 | 2 | 0 | 2 | ➖ | | Version sanity check | 0 | 0 | 2 | 0 | 2 | ➖ | +----------------------+--------+--------+---------+-------+-------+--------+ | Total | 773 | 1 | 100 | 8 | 874 | ❌ | +----------------------+--------+--------+---------+-------+-------+--------+
Edited by Ghost UserSetting label grouppipeline authoring based on
@lauraX
's group.added grouppipeline authoring label
Setting label(s) devopsverify sectionops based on grouppipeline authoring.
added devopsverify sectionops labels
added 1082 commits
-
234f1cfa...cd10caae - 1081 commits from branch
master
- 1fb63829 - Support variables in rules: exists
-
234f1cfa...cd10caae - 1081 commits from branch
- Resolved by Laura Montemayor
Hi @furkanayhan! Do you think this needs a FF? I know that Marius had the
rules: changes
MR under a FF, but it was also the variable expansion one, so I'm not sure🤔
requested review from @avielle and @marcel.amirault
added 563 commits
-
1fb63829...304c0ba5 - 560 commits from branch
master
- 29a29fdc - Support variables in rules: exists
- 2e6dbf71 - Adds ci_variable_rules_exist feature flag
- 80256555 - Adds docs for rules:exists variable expansion
Toggle commit list-
1fb63829...304c0ba5 - 560 commits from branch
- Resolved by Marius Bobin
@avielle - could you please do the first review of this MR? I did some refactoring in order to enable the new functionality and sort of kept the refactoring for the feature flag usage. Let me know what you think.
- Resolved by Laura Montemayor
Hi @marcel.amirault - could you please do a docs review for variable expansion in
rules: exists
? Thank you!
- Resolved by Laura Montemayor
- A deleted user
added documentation feature flag labels
- Resolved by Laura Montemayor