-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
68 lines (65 loc) · 2.49 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
gerritReview labels: [Verified: 0], message: "Test started: ${env.BUILD_URL}"
@Library('sw-jenkins-library@4cab7c41c21e8a30612b3bf50a8db50fa7f56a4d') _
pipeline {
agent none
stages {
stage('Offline tests') {
agent {
dockerfile {
label 'exploration_tool'
}
}
steps {
sh 'tox'
}
}
stage('XM112 integration tests') {
options {
lock resource: '${env.NODE_NAME}-xm112'
}
stages {
stage('Flash') {
agent {
label 'exploration_tool'
}
steps {
findBuildAndCopyArtifacts(projectName: 'sw-main', revision: "master", artifactName: "internal_stash_scripts_embedded.zip")
findBuildAndCopyArtifacts(projectName: 'sw-main', revision: "master", artifactName: "internal_stash_xm112.zip")
sh 'rm -rf stash'
sh 'unzip -q internal_stash_scripts_embedded.zip -d stash'
sh 'unzip -q internal_stash_xm112.zip -d stash'
sh '(cd stash && PYTHONPATH=$PYTHONPATH:./scripts/integrator/embedded/ python3 scripts/integrator/module_server/flash.py)'
}
}
stage('Integration tests') {
agent {
dockerfile {
label 'exploration_tool'
args '--net=host --privileged'
}
}
steps {
sh 'python3 -m pip install -q -U --user .'
sh 'pytest -v tests/integration --mock --uart --spi'
}
}
}
}
stage('GUI tests') {
agent {
dockerfile {
label 'exploration_tool'
}
}
steps {
sh 'python3 -m pip install -U --user .'
sh 'pytest -v --timeout=60 --timeout_method=thread tests/gui'
}
}
}
post {
success { gerritReview labels: [Verified: 1], message: "Success: ${env.BUILD_URL}" }
failure { gerritReview labels: [Verified: -1], message: "Failed: ${env.BUILD_URL}" }
aborted { gerritReview labels: [Verified: -1], message: "Aborted: ${env.BUILD_URL}" }
}
}