-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
46 lines (44 loc) · 1.02 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
44
45
46
pipeline {
agent any
options {
timestamps()
}
stages {
/*stage('Static Code') {
steps {
bat 'C:/tools/cloc.exe --by-file --xml --out=Visualizer/build/reports/cloc/cloc.xml Visualizer/src'
}
}*/
stage('Compile') {
steps {
bat 'gradle assemble --build-file Visualizer/build.gradle'
}
}
stage('Test') {
steps {
bat 'gradle check --build-file Visualizer/build.gradle'
}
}
stage('Statistics') {
steps {
junit '**/build/test-results/test/*.xml'
}
/*steps {
CLOCCount is not compatible with jenkinsfile yet...
}*/
}
stage('Cleaning') {
steps {
bat 'gradle clean --build-file Visualizer/build.gradle'
}
}
}
post {
success {
slackSend channel: "#code", color: "good", message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
}
failure {
slackSend channel: "#code", color: "danger", message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
}
}
}