-
Notifications
You must be signed in to change notification settings - Fork 110
/
Jenkinsfile
32 lines (27 loc) · 1.19 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
#!groovy
def builddir='shutit-' + env.BUILD_NUMBER
def branch=env.BRANCH_NAME
try {
lock('shutit_tests') {
stage('setupenv') {
node() {
sh 'mkdir -p ' + builddir
dir(builddir) {
checkout([$class: 'GitSCM', branches: [[name: '*/' + branch]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: false, recursiveSubmodules: true, reference: '', trackingSubmodules: false]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/ianmiell/shutit']]])
}
}
}
stage('shutit_tests') {
node() {
dir(builddir + '/shutit-test') {
sh('PATH=$(pwd)/..:${PATH} ./run.sh -s tk.shutit.shutit_test shutit_branch ' + branch + ' -l info 2>&1')
}
}
}
}
mail bcc: '', body: '''See: http://jenkins.meirionconsulting.tk/job/shutit''', cc: '', from: '[email protected]', replyTo: '', subject: 'Build OK', to: '[email protected]'
} catch(err) {
mail bcc: '', body: '''See: http://jenkins.meirionconsulting.tk/job/shutit
''' + err, cc: '', from: '[email protected]', replyTo: '', subject: 'Build failure', to: '[email protected]'
throw(err)
}