-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
44 lines (37 loc) · 1.06 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
#!/usr/bin/env groovy
pipeline {
agent any
options {
skipDefaultCheckout()
}
stages {
stage('Checkout') {
steps {
sh 'echo "Started job \"$JOB_NAME [$BUILD_NUMBER]\". Check console output at $RUN_DISPLAY_URL" | slack-cli -d teknisk || true'
deleteDir()
checkout scm
}
}
stage('Test') {
steps {
sh './test_xspec.sh'
sh './test_unit.sh'
sh './test_system.sh'
}
}
}
post {
always {
archiveArtifacts artifacts: "target/**/*.log"
archiveArtifacts artifacts: "target/**/log.txt"
cleanWs()
}
failure {
sh 'slack-cli -d teknisk -f target/test-result.txt || true'
sh 'echo "Build failed: \"$JOB_NAME [$BUILD_NUMBER]\"" | slack-cli -d teknisk || true'
}
success {
sh 'echo "Build successful: \"$JOB_NAME [$BUILD_NUMBER]\"" | slack-cli -d teknisk || true'
}
}
}