-
Notifications
You must be signed in to change notification settings - Fork 21
/
Jenkinsfile
73 lines (73 loc) · 2.46 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
pipeline {
agent any
stages {
stage('Build Docker Images') {
steps {
sh 'docker build -t cynthion github.com/greatscottgadgets/cynthion'
sh 'docker build -t cynthion-test github.com/greatscottgadgets/cynthion-test'
}
}
stage('Cynthion selftest') {
agent{
docker {
image 'cynthion'
reuseNode true
args '--name cynthion_container --group-add=46 --device-cgroup-rule="c 189:* rmw" --device /dev/bus/usb'
}
}
steps {
sh './ci/build.sh'
sh 'hubs all off'
retry(3) {
sh './ci/test.sh'
}
sh 'hubs all reset'
}
}
stage('Cynthion-test') {
agent{
docker {
image 'cynthion-test'
reuseNode true
args '''
--name cynthion-test_container
--group-add=20
--group-add=46
--device-cgroup-rule="c 166:* rmw"
--device-cgroup-rule="c 189:* rmw"
--device /dev/bus/usb
--volume /run/udev/control:/run/udev/control
--net=host
'''
}
}
steps {
sh '''#!/bin/bash
git clone https://github.com/greatscottgadgets/cynthion-test
cd cynthion-test/
cp /tmp/calibration.dat calibration.dat
make
environment/bin/pip install --upgrade dependencies/cynthion/cynthion/python/.
make analyzer.bit
'''
sh 'hubs all off'
retry(3) {
sh '''#!/bin/bash
hubs cyntest_tycho cyntest_greatfet cyntest_bmp reset
cd cynthion-test/
make unattended
'''
}
sh 'hubs all reset'
}
}
}
post {
always {
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
notFailBuild: true)
}
}
}