Adjust remote URL.
This commit is contained in:
parent
85a1f1f15e
commit
e5581136fd
|
@ -154,9 +154,10 @@ def exec(actions, repo_url, repo_name) {
|
|||
|
||||
dir(repo_name) {
|
||||
withCredentials([usernamePassword(credentialsId: '88b54962-1c0e-49cb-8155-22276860f346', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
def repository = repo_url.replaceFirst(".+://", "https://${GIT_USERNAME}:${GIT_PASSWORD}@")
|
||||
def complete_url = "${repo_url}/${$repo_name}.git"
|
||||
def repository = complete_url.replaceFirst(".+://", "https://${GIT_USERNAME}:${GIT_PASSWORD}@")
|
||||
sh("""
|
||||
git remote set-url origin $repository/$repo_name.git
|
||||
git remote set-url origin $repository
|
||||
git remote -v
|
||||
echo $actions > actions.sh
|
||||
chmod a+x actions.sh
|
||||
|
|
Loading…
Reference in New Issue