-
-
Notifications
You must be signed in to change notification settings - Fork 75
/
Jenkinsfile
91 lines (83 loc) · 1.83 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!groovy
pipeline {
agent any
stages {
// Build
stage('Build') {
agent {
label 'virtualenv'
}
steps {
deleteDir()
checkout scm
sh 'make build'
sh 'tar cfz build.tgz bin develop-eggs include lib parts src *.cfg Makefile requirements.txt'
stash includes: 'build.tgz', name: 'build.tgz'
}
}
// Static Code Analysis
/*
stage('Static Code Analysis') {
agent {
label 'virtualenv'
}
steps {
deleteDir()
unstash 'build.tgz'
sh 'tar xfz build.tgz'
sh 'make code-analysis'
}
}*/
// Unit Tests
stage('Unit Tests') {
agent {
label 'virtualenv'
}
steps {
deleteDir()
unstash 'build.tgz'
sh 'tar xfz build.tgz'
sh 'make test'
sh 'ls -al parts/test/testreports'
}
post {
always {
step([
$class: 'JUnitResultArchiver',
testResults: 'parts/test/testreports/*.xml'
])
}
}
}
// Acceptance Tests
stage('Acceptance Tests') {
agent {
label 'virtualenv'
}
steps {
deleteDir()
unstash 'build.tgz'
sh 'tar xfz build.tgz'
wrap([$class: 'Xvfb']) {
sh 'make test-acceptance'
}
}
post {
always {
step([
$class: 'RobotPublisher',
disableArchiveOutput: false,
logFileName: 'parts/test/robot_log.html',
onlyCritical: true,
otherFiles: '**/*.png',
outputFileName: 'parts/test/robot_output.xml',
outputPath: '.',
passThreshold: 100,
reportFileName: 'parts/test/robot_report.html',
unstableThreshold: 0
]);
}
}
}
}
}