qa: Make new parameters modifiable through env
This commit is contained in:
parent
1f833d39fc
commit
f3cdf1afca
@ -6,6 +6,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -14,7 +15,7 @@ import (
|
||||
var adminLink string
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&adminLink, "admin-link", adminLink, "URL to admin interface, to use its features as replacement")
|
||||
flag.StringVar(&adminLink, "admin-link", os.Getenv("FIC_QA_ADMIN_LINK"), "URL to admin interface, to use its features as replacement")
|
||||
}
|
||||
|
||||
func fwdAdmin(method, urlpath string, body io.Reader, out interface{}) error {
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
@ -33,10 +34,14 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
if v, ok := os.LookupEnv("FIC_OIDC_REDIRECT"); ok {
|
||||
oidcRedirectURL = v
|
||||
}
|
||||
|
||||
flag.StringVar(&oidcRedirectURL, "oidc-redirect", oidcRedirectURL, "Base URL for the redirect after connection")
|
||||
flag.StringVar(&gitlabBaseURL, "gitlab-baseurl", gitlabBaseURL, "Base URL of the Gitlab instance")
|
||||
flag.StringVar(&gitlabClientID, "gitlab-clientid", gitlabClientID, "ClientID for GitLab's OIDC")
|
||||
flag.StringVar(&gitlabSecret, "gitlab-secret", gitlabSecret, "Secret for GitLab's OIDC")
|
||||
flag.StringVar(&gitlabClientID, "gitlab-clientid", os.Getenv("FIC_GITLAB_CLIENT_ID"), "ClientID for GitLab's OIDC")
|
||||
flag.StringVar(&gitlabSecret, "gitlab-secret", os.Getenv("FIC_GITLAB_CLIENT_SECRET"), "Secret for GitLab's OIDC")
|
||||
}
|
||||
|
||||
func InitializeGitLabOIDC(baseURL string) {
|
||||
|
Loading…
Reference in New Issue
Block a user