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() {
2323 SCMM_HOST=$( getHost " ${SCMM_URL} " )
2424 SCMM_PROTOCOL=$( getProtocol " ${SCMM_URL} " )
2525
26- setExternalHostnameIfNecessary ' SCMM' ' scmm-scm-manager' ' default'
26+ if [[ ${INTERNAL_SCMM} == true ]]; then
27+ setExternalHostnameIfNecessary ' SCMM' ' scmm-scm-manager' ' default'
28+ fi
29+
2730 [[ " ${SCMM_URL} " != * scm ]] && SCMM_URL=${SCMM_URL} /scm
2831
2932 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() {
5555 local serviceName=" $2 "
5656 local namespace=" $3 "
5757
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
6260 # Only if apps are not external
6361 # Our apps are configured to use port 80 on remote clusters
64- # Argo forwards to HTTPS so simply use HTTP here
6562 declare -g " ${variablePrefix} _URL" =" http://$( getExternalIP " ${serviceName} " " ${namespace} " ) "
6663 fi
6764}
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ class ScmManager extends Feature {
7777 SCMM_USERNAME : config. scmm[' username' ],
7878 SCMM_PASSWORD : config. scmm[' password' ],
7979 JENKINS_URL : config. jenkins[' url' ],
80+ INTERNAL_SCMM : config. scmm[' internal' ],
8081 JENKINS_URL_FOR_SCMM : config. jenkins[' urlForScmm' ],
8182 SCMM_URL_FOR_JENKINS : config. scmm[' urlForJenkins' ],
8283 // Used indirectly in utils.sh 😬
You can’t perform that action at this time.
0 commit comments