ci: Only include danger-review on gitlab.com and jihulab.com
What does this MR do and why?
The goal is to make sure we don't depend on GitLab.com when pipelines run in dev (or on other instances).
We include a specific .gitlab/ci/gitlab-com
folder when $CI_SERVER_HOST == "gitlab.com"
or $CI_SERVER_HOST == "jihulab.com"
.
Then in .gitlab/ci/gitlab-com/danger-review.gitlab-ci.yml
we include the danger-review
template from pipeline-common
.
We cannot include the template directly when $CI_SERVER_HOST == "gitlab.com"
or $CI_SERVER_HOST == "jihulab.com"
because we would face the same problem as gitlab-org/charts/gitlab!3317 (merged), where we try to override the danger-review
job which isn't actually defined since the template wouldn't be necessarily included (e.g. on dev).
This is the same strategy as what's done in omnibus-gitlab
(see "Option 1" in #428683 (closed)).
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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 #428683 (closed)