diff --git a/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy b/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy index 7054ce7c..bfdd1fbc 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy @@ -55,7 +55,11 @@ class ArgoApplicationVersionUpdater { if (userSpecifiedArgoControlledRepo) { // argoControlledRepo is a git url, so we need add username and password to the url def argoControlledRepoUrlObj = new URL(component.argoControlledRepo) - ciOriginUrl = "${argoControlledRepoUrlObj.protocol}://${steps.env.OPS_GIT_USERNAME}:${steps.env.OPS_GIT_PASSWORD}@${argoControlledRepoUrlObj.host}${argoControlledRepoUrlObj.path}" + if (argoControlledRepoUrlObj.port != null) { + ciOriginUrl = "${argoControlledRepoUrlObj.protocol}://${steps.env.OPS_GIT_USERNAME}:${steps.env.OPS_GIT_PASSWORD}@${argoControlledRepoUrlObj.host}:${argoControlledRepoUrlObj.port}${argoControlledRepoUrlObj.path}" + } else { + ciOriginUrl = "${argoControlledRepoUrlObj.protocol}://${steps.env.OPS_GIT_USERNAME}:${steps.env.OPS_GIT_PASSWORD}@${argoControlledRepoUrlObj.host}${argoControlledRepoUrlObj.path}" + } } steps.sh """ #!/bin/bash