This repository has been archived by the owner on Jul 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
82 lines (73 loc) · 1.96 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
pipeline {
agent {
docker {
image 'ubuntu:18.04'
args "-u root:sudo -v ${env.DOCS_PATH}:${env.DOCS_PATH}"
}
}
environment {
CC = 'clang'
CXX = 'clang++'
DEBIAN_FRONTEND = 'noninteractive'
LANG = 'C'
npm_config_cache = "${pwd()}/.npm"
}
stages {
stage('Build Supermom') {
steps {
build job: 'supermom/master', wait: false
}
}
stage('Bootstrap') {
steps {
sh 'apt-get update'
sh 'apt-get -y install build-essential'
sh 'make bootstrap'
}
}
stage('Build') {
steps {
sh 'mkdir -p build'
sh 'cd build && cmake .. -DBUILD_LIBUSB=ON -DBUILD_DOC=ON'
sh 'cd build && make'
}
}
stage('Run tests') {
options {
timeout(time: 30)
}
steps {
sh 'make test'
}
}
stage('Deploy docs') {
when {
expression { "${env.DOCS_PATH}" != "" }
}
steps {
sh "mkdir -p ${DOCS_PATH}/librpc"
sh "rm -rf ${DOCS_PATH}/librpc/*"
sh "cp -dR build/docs/* ${DOCS_PATH}/librpc/"
}
}
stage('Cleanup') {
steps {
sh 'chown -v -R 9001:9001 .'
}
}
}
post {
always {
build job: 'ports/master', wait: false
junit 'junit-test-results.xml'
publishHTML target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'coverage-report',
reportFiles: 'index.html',
reportName: 'Code coverage report'
]
}
}
}