Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/source/domains.go')
-rw-r--r--internal/source/domains.go22
1 files changed, 15 insertions, 7 deletions
diff --git a/internal/source/domains.go b/internal/source/domains.go
index 1b847cc9..44c1f30a 100644
--- a/internal/source/domains.go
+++ b/internal/source/domains.go
@@ -2,20 +2,28 @@ package source
import (
"errors"
+ "os"
+ "strings"
"gitlab.com/gitlab-org/gitlab-pages/internal/domain"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/disk"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab"
)
-var newSourceDomains = []string{
- "pages-project-poc.gitlab.io",
- "pages-namespace-poc.gitlab.io",
- "new-source-test.gitlab.io", // used also in acceptance tests
- "pages-custom-poc.grzegorz.co",
-}
+var newSourceDomains []string
+var brokenSourceDomain string
+
+func init() {
+ testDomains := os.Getenv("GITLAB_NEW_SOURCE_DOMAINS")
+ if testDomains != "" {
+ newSourceDomains = strings.Split(testDomains, ",")
+ }
-var brokenSourceDomain = "pages-broken-poc.gitlab.io"
+ brokenDomain := os.Getenv("GITLAB_NEW_SOURCE_BROKEN_DOMAIN")
+ if brokenDomain != "" {
+ brokenSourceDomain = brokenDomain
+ }
+}
// Domains struct represents a map of all domains supported by pages. It is
// currently using two sources during the transition to the new GitLab domains