We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8d5dd6 commit 173737cCopy full SHA for 173737c
1 file changed
Jenkinsfile
@@ -25,8 +25,7 @@ node {
25
26
stage('Preparation') {
27
dir("kura") {
28
- def scmResult = checkout scm
29
- env.GIT_BRANCH = scmResult.GIT_BRANCH
+ checkout scm
30
sh "touch /tmp/isJenkins.txt"
31
}
32
@@ -39,9 +38,9 @@ node {
39
38
40
41
42
- echo "Current branch is \"${env.GIT_BRANCH}\", primary: ${env.BRANCH_IS_PRIMARY}"
+ echo "Current branch is \"${scm.branches[0].name}\", primary: ${env.BRANCH_IS_PRIMARY}"
43
def buildType = 'install'
44
- if (env.BRANCH_IS_PRIMARY && 'develop'.equals(scmResult.GIT_BRANCH)) {
+ if (env.BRANCH_IS_PRIMARY && 'develop'.equals(scm.branches[0].name)) {
45
echo "Using deploy target"
46
buildType = 'deploy'
47
} else {
0 commit comments