Replace remote in the cloned repo.

This commit is contained in:
Manuele Simi 2021-01-17 22:39:37 -05:00
parent f9b2d36c6c
commit 85a1f1f15e
1 changed files with 2 additions and 0 deletions

2
Jenkinsfile vendored
View File

@ -156,6 +156,8 @@ def exec(actions, repo_url, 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}@")
sh("""
git remote set-url origin $repository/$repo_name.git
git remote -v
echo $actions > actions.sh
chmod a+x actions.sh
source actions.sh