-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
44 lines (44 loc) · 980 Bytes
/
Jenkinsfile
File metadata and controls
44 lines (44 loc) · 980 Bytes
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
pipeline {
agent any
stages {
stage('Build') {
steps {
parallel(
"Build": {
sh './setup.sh'
sh 'rm -rf build && mkdir -p build'
sh 'cd build && ls -lah'
sh 'cd build && cmake ..'
sh 'cd build && ls -lah'
sh 'cd build && pwd'
sh 'cd build && make -j 12'
},
"Documentation": {
sh 'doxygen ./doxygen-config'
sh 'zip -r docs.zip docs'
}
)
}
}
stage('Test') {
steps {
sh 'cd build && make check'
}
}
stage ('Deploy') {
when {
expression { env.BRANCH_NAME == 'master' }
}
steps {
sh "mkdir -p ${env.DOCS_WEB_ROOT}/${env.JOB_NAME}"
sh "rm -rf ${env.DOCS_WEB_ROOT}/${env.JOB_NAME}/*"
sh "cp -r ./docs/* ${env.DOCS_WEB_ROOT}/${env.JOB_NAME}"
}
}
}
post {
always {
archive 'docs.zip'
}
}
}