Replace this template with your information
Describe your question in as much detail as possible:
I have setup CI/CD pipeline and I am working on running few steps only if label is present in merge request.
-
What are you seeing, and how does that differ from what you expect to see?
I see a full build not respecting the conditional -
Consider including screenshots, error messages, and/or other helpful visuals
create-grant:
stage: create-grant
extends: .setup_required
script:
- bash ./scripts/myscript.sh
rules: &Setting
- if: '$CI_MERGE_REQUEST_LABELS =~ $image_label_regex && ($CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'
changes:
- .gitlab-ci.yml
- gitlab_templates/*.yml
-
What version are you on? Are you using self-managed or GitLab.com?
Self-managed
v13.10