-
Notifications
You must be signed in to change notification settings - Fork 9
/
Jenkinsfile
43 lines (41 loc) · 1.53 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
#!/usr/bin/env groovy
timestamps {
node ('hfrd') {
properties([disableConcurrentBuilds()])
stage('checkout scm') {
checkout scm
}
commitHash = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(7)
commitText = sh(returnStdout: true, script: 'git show -s --format=format:"*%s* _by %an_" HEAD').trim()
changeLog = "`${commitHash}` ${commitText}"
try {
stage('hfrd/server docker build test') {
sh '''set -e
make api-docker
'''
}
stage('test modules test against fabric v1.2') {
sh '''set -e
cd modules/gosdk
./gosdk_example.sh 1.2
'''
}
stage('test modules test against fabric v1.3') {
sh '''set -e
cd modules/gosdk
./gosdk_example.sh 1.3
'''
}
stage('test modules test against fabric v1.4') {
sh '''set -e
cd modules/gosdk
./gosdk_example.sh 1.4
'''
}
} catch(e) {
slackSend color: 'danger', message: "@here FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})\n${changeLog}"
throw e
}
slackSend color: 'good', message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})\n${changeLog}"
}
}