File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
src/main/groovy/com/cloudogu/gitops/features Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ function initSCMM() {
23
23
SCMM_HOST=$( getHost " ${SCMM_URL} " )
24
24
SCMM_PROTOCOL=$( getProtocol " ${SCMM_URL} " )
25
25
26
- setExternalHostnameIfNecessary ' SCMM' ' scmm-scm-manager' ' default'
26
+ if [[ ${INTERNAL_SCMM} == true ]]; then
27
+ setExternalHostnameIfNecessary ' SCMM' ' scmm-scm-manager' ' default'
28
+ fi
29
+
27
30
[[ " ${SCMM_URL} " != * scm ]] && SCMM_URL=${SCMM_URL} /scm
28
31
29
32
configureScmmManager " ${SCMM_USERNAME} " " ${SCMM_PASSWORD} " " ${SCMM_URL} " " ${JENKINS_URL_FOR_SCMM} " \
Original file line number Diff line number Diff line change @@ -55,13 +55,10 @@ function setExternalHostnameIfNecessary() {
55
55
local serviceName=" $2 "
56
56
local namespace=" $3 "
57
57
58
- # :-} expands to empty string, e.g. for INTERNAL_ARGO which does not exist.
59
- # This only works when checking for != false 😬
60
- if [[ $REMOTE_CLUSTER == true && " $( eval echo " \$ {INTERNAL_${variablePrefix} :-}" ) " != ' false' ]]; then
61
- # Update SCMM_URL or JENKINS_URL or ARGOCD_URL
58
+ if [[ $REMOTE_CLUSTER == true ]]; then
59
+ # Update SCMM_URL or JENKINS_URL
62
60
# Only if apps are not external
63
61
# Our apps are configured to use port 80 on remote clusters
64
- # Argo forwards to HTTPS so simply use HTTP here
65
62
declare -g " ${variablePrefix} _URL" =" http://$( getExternalIP " ${serviceName} " " ${namespace} " ) "
66
63
fi
67
64
}
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ class ScmManager extends Feature {
77
77
SCMM_USERNAME : config. scmm[' username' ],
78
78
SCMM_PASSWORD : config. scmm[' password' ],
79
79
JENKINS_URL : config. jenkins[' url' ],
80
+ INTERNAL_SCMM : config. scmm[' internal' ],
80
81
JENKINS_URL_FOR_SCMM : config. jenkins[' urlForScmm' ],
81
82
SCMM_URL_FOR_JENKINS : config. scmm[' urlForJenkins' ],
82
83
// Used indirectly in utils.sh 😬
You can’t perform that action at this time.
0 commit comments