-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathJenkinsfile
43 lines (41 loc) · 1.39 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!groovy
@Library('globalPipelineLibraryMarkEWaite') _
pipeline {
agent {
label '!windows' // allow sh step
}
tools {
ant 'ant-latest'
}
options {
skipDefaultCheckout(true)
}
stages {
stage("Checkout") {
steps {
// echo "Branch is ${env.BRANCH_NAME}"
// echo "scm is ${scm}"
// echo "scm.userRemoteConfigs is ${scm.userRemoteConfigs}"
// echo "scm.userRemoteConfigs[0].url is ${scm.userRemoteConfigs[0].url}"
// sh "env | sort"
checkout(
[ $class: 'GitSCM',
branches: [[name: "refs/heads/${env.BRANCH_NAME}"]],
extensions: [
[ $class: 'CloneOption', depth: 1, honorRefspec: true, noTags: true, reference: '/var/lib/git/mwaite/bugs/jenkins-bugs.git', shallow: true],
[ $class: 'LocalBranch', localBranch: env.BRANCH_NAME],
[ $class: 'PruneStaleBranch']
],
gitTool: scm.gitTool,
userRemoteConfigs: [
[ refspec: scm.userRemoteConfigs[0].refspec,
url: scm.userRemoteConfigs[0].url
]
]
]
)
sh "ant info"
}
}
}
}