fix(argo): enhance ciOriginUrl construction in ArgoApplicationVersionUpdater to handle optional port in repository URL
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
decc7e90f9
commit
190c20cae0
@ -55,8 +55,12 @@ 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)
|
||||
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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user