I have multi project pipelines and within my downstream pipeline (e2e) I have defined a chrome job which runs on every push, merge request and nightly scheduled pipeline. I created an almost identical firefox job that I want to run only on the nightly pipeline. The caveat is that upon logging the predefined gitlab variables during the install phase, I saw that the nightly pipeline has CI_PIPELINE_SOURCE = pipeline
, instead of scheduled
, and this is where all problems arose for me.
The issue is that the firefox job either gets triggered everywhere, or does not get triggered at all.
I tried using
`rules:
- changes
- scheduled
when: always - when: manual`
and this results in the firefox job having to be triggered manually everytime.
I tried using
`rules:
- if: ‘$CI_PIPELINE_SOURCE = “schedule”‘`
but this just disregards the firefox job in the nightly pipeline because the CI_PIPELINE_SOURCE
is pipeline
.
I tried using a custom variable by defining it both in my nightly test job using the gitlab UI (variable name: FIREFOX
, value: true
) and in my gitlab-ci.yml file
variables; FIREFOX: true
then in my firefox job I added
`rules:
- if: $FIREFOX = “true”`
and this didn’t work either.
What am I missing?
mih-ana is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.