File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- PLATFORM_MASTER = 'master-4.5'
1
+ MASTER_BRANCH = 'master-4.5'
2
2
3
3
pipeline {
4
- // by default run on the master node, since it's the only one with direct repo access
5
4
agent { label 'master' }
6
5
options {
7
6
skipDefaultCheckout() // no checkout needed
@@ -12,19 +11,20 @@ pipeline {
12
11
stage('Trigger build') {
13
12
steps {
14
13
script {
14
+ def multiBranchJobPath = '../../hivemq4-composite'
15
15
def branchJobName = BRANCH_NAME.replace('/', '%2F')
16
16
try {
17
- build job: "../../hivemq4-composite /${branchJobName}", wait: false
17
+ build job: "${multiBranchJobPath} /${branchJobName}", wait: false
18
18
} catch (e) {
19
19
try {
20
20
sh """
21
- git clone git@github.com:hivemq/hivemq.git --branch=${PLATFORM_MASTER } --single-branch --depth 1 .
21
+ git clone git@github.com:hivemq/hivemq.git --branch=${MASTER_BRANCH } --single-branch --depth 1 .
22
22
git push origin HEAD:${BRANCH_NAME}
23
23
"""
24
24
} catch (e2) { // if push failed, branch already exists
25
25
} finally {
26
26
cleanWs()
27
- build job: "../../hivemq4-composite" , wait: false
27
+ build job: multiBranchJobPath , wait: false
28
28
}
29
29
}
30
30
}
You can’t perform that action at this time.
0 commit comments