-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
52 lines (52 loc) · 1.3 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
pipeline {
agent {
node {
label "kirk"
}
}
environment {
TEST_QEMU_IMAGE = "/data/image.qcow2"
TEST_QEMU_PASSWORD = "root"
TEST_SSH_USERNAME = "auto"
TEST_SSH_PASSWORD = "auto1234"
TEST_SSH_KEY_FILE = "/data/jenkins_rsa"
TEST_LTX_BINARY = "/data/ltx"
}
stages {
stage("Test host") {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'coverage run -a -m pytest -m "not qemu and not ssh" --junit-xml=results-host.xml'
}
}
}
stage("Test SSH") {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'coverage run -a -m pytest -m "ssh" --junit-xml=results-ssh.xml'
}
}
}
stage("Test Qemu") {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'coverage run -a -m pytest -m "qemu" --junit-xml=results-qemu.xml'
}
}
}
stage("Test LTX") {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'coverage run -a -m pytest -m "ltx" --junit-xml=results-ltx.xml'
}
}
}
}
post {
always {
sh 'coverage xml -o coverage.xml'
cobertura coberturaReportFile: 'coverage.xml'
junit 'results-*.xml'
}
}
}