Skip to content

Multi project paths support for JiHu GitLab ci pipelines

Problem to solve

The rule if_jh limits the jobs for JiHu GitLab only when the project path is gitlab-jh/gitlab.

Proposal

As far as I know, there are four kinds of project paths according to JiHu requirements.

  • gitlab-jh/gitlab: Canonical project repo in gitlab.com and dev-ops.gitlab.cn
  • gitlab-cn/gitlab: Canonical project repo in gitlab.cn
  • gitlab-jh/security/gitlab: Security repo in gitlab.com
  • gitlab-cn/security/gitlab: Security repo in gitlab.cn

We can update the ci rule with regex. For example

if: '$CI_PROJECT_PATH =~ /^gitlab-(jh|cn)\/.*/'
Edited by vincent stchu