Support configuring jihulab.com & jihulab.hk
What does this MR do and why?
Related Issue: https://jihulab.com/gitlab-cn/gitlab/-/issues/2425
- 支持新的环境变量字段
SAAS_ENVIRONMENT
,根据该字段判断是否为 HK 的 SaaS 环境 - 增加 HK 环境的新域名
CN | HK |
---|---|
https://jihulab.com |
https://jihulab.hk |
https://staging.jihulab.com |
https://staging.jihulab.hk |
https://next.jihulab.com |
https://next.jihulab.hk |
https://customers.jihulab.com |
https://customers.jihulab.hk |
https://customers.stg.jihulab.com |
https://customers.stg.jihulab.hk |
How to set up and validate locally
$ bin/rails console
[1] pry(main)> Gitlab::Saas.com_url
=> "https://jihulab.com"
[2] pry(main)> Gitlab::Saas.staging_com_url
=> "https://staging.jihulab.com"
[3] pry(main)> Gitlab::Saas.canary_toggle_com_url
=> "https://next.jihulab.com"
[4] pry(main)> Gitlab::SubscriptionPortal.default_subscriptions_url
=> "https://customers.stg.jihulab.com"
$ SAAS_ENVIRONMENT=hk bin/rails console
[1] pry(main)> Gitlab::Saas.com_url
=> "https://jihulab.hk"
[2] pry(main)> Gitlab::Saas.staging_com_url
=> "https://staging.jihulab.hk"
[3] pry(main)> Gitlab::Saas.canary_toggle_com_url
=> "https://next.jihulab.hk"
[4] pry(main)> Gitlab::SubscriptionPortal.default_subscriptions_url
=> "https://customers.stg.jihulab.hk"
由 路志远 编辑于