diff --git a/Jenkinsfile b/Jenkinsfile index d9eda37..540852e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -158,17 +158,17 @@ def exec(actions, repo_url, repo_name) { withCredentials([usernamePassword(credentialsId: '88b54962-1c0e-49cb-8155-22276860f346', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { def complete_url = "${repo_url}.git" def repository = complete_url.replaceFirst(".+://", "https://${GIT_USERNAME}:${GIT_PASSWORD}@") - sh(""" - git remote set-url origin $repository - git remote -v - git config user.email "git.gcube@localhost" - git config user.name "git.gcube" - curl "${ACTION_URL}" -o actions.sh - chmod a+x actions.sh - source actions.sh - rm actions.sh - git push --force origin HEAD:master || true - """) + output = sh(script: """ + git remote set-url origin $repository + git remote -v + git config user.email "git.gcube@localhost" + git config user.name "git.gcube" + curl "${ACTION_URL}" -o actions.sh + chmod a+x actions.sh + source actions.sh + rm actions.sh + git push --force origin HEAD:master || true + """), returnStdout: true)?.trim() } } }