File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ pipeline {
17
17
build job: "${multiBranchJobPath}/${branchJobName}", wait: false
18
18
} catch (e) {
19
19
try {
20
- sh """
21
- git clone git@github.com:hivemq/hivemq.git --branch=${MASTER_BRANCH} --single-branch --depth 1 .
22
- git push origin HEAD:${BRANCH_NAME}
23
- """
24
- } catch (e2) { // if push failed, branch already exists
20
+ withCredentials([gitUsernamePassword(credentialsId: 'hivemq-jenkins')]) {
21
+ sh("git clone https://github.com/hivemq/hivemq.git --branch=${MASTER_BRANCH} --single-branch --depth 1 .")
22
+ try {
23
+ sh("git push origin HEAD:${BRANCH_NAME}")
24
+ } catch (e2) { // if push failed, branch already exists
25
+ }
26
+ }
25
27
} finally {
26
28
cleanWs()
27
29
build job: multiBranchJobPath, wait: false
You can’t perform that action at this time.
0 commit comments