-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile
66 lines (66 loc) · 2.03 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
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '2'))
}
agent any
stages {
stage('PreBuild') {
parallel {
stage('Pipdeps') {
steps {
sh 'python3 -m virtualenv venv'
sh 'chmod a+x venv/bin/activate'
sh '. venv/bin/activate && pip install -r requirements.txt'
sh '. venv/bin/activate && pip install codecov nose mock sphinx'
}
}
stage('Otherdeps'){
steps{
sh 'export DISPLAY=:99.0'
sh 'Xvfb :99 &'
sh 'sleep 3'
}
}
}
}
stage('Build') {
steps {
sh '. venv/bin/activate && make build'
}
post {
success {
echo 'Build succeeded.'
}
failure {
echo 'Build failed.'
}
}
}
stage('Test') {
steps {
sh '. venv/bin/activate && export DISPLAY=:99.0 && make test'
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
echo 'This is the Deploy Stage'
}
post {
success {
echo 'Deploy succeeded'
}
failure {
echo 'Deploy failed'
}
}
}
stage('Cleanup') {
steps {
sh '. venv/bin/activate && make clean'
}
}
}
}