I am using gitlabci.yaml to import some existing deployment templates-- a.yml and b.yml.
I am trying to control this using a flag RELEASE_PIPELINE
, which if true should pickup template b.yml and if false should pickup a.yml.
Below is how to the gitlab yaml looks like:
RELEASE_PIPELINE:
value: "false"
options:
- "false"
- "true"
include:
- project: abc/def
ref: main
file: templates/a.yml
rules:
- $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_OPEN_MERGE_REQUESTS == null && $RELEASE_PIPELINE == "false"
- project: abc/def
ref: main
file: templates/release/b.yml
rules:
- if: $RELEASE_PIPELINE == "true"
Given the fact that I would like to have the default value as false, my automated triggers do not seem to recognise the below block.
include:
- project: abc/def
ref: main
file: templates/a.yml
rules:
- $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_OPEN_MERGE_REQUESTS == null && $RELEASE_PIPELINE == "false"
When I manually select false from the drop down, it does seem to pick up a.yml. What am i doing wrong?