forked from devpi/devpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
51 lines (50 loc) · 1.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
pipeline {
agent none
stages {
stage('Build') {
agent {
label 'linux'
}
steps {
sh 'cd client && python3 setup.py sdist bdist_wheel'
sh 'cd server && python3 setup.py sdist bdist_wheel'
sh 'cd web && python3 setup.py sdist bdist_wheel'
stash includes: '**/dist/*.whl', name: 'devpi'
}
post {
always {
archiveArtifacts artifacts: '**/dist/*.whl', onlyIfSuccessful: true
}
}
}
stage('Test') {
agent {
label 'linux'
}
steps {
sh 'cd server && tox'
sh 'cd web && tox'
}
post {
always {
junit 'server/results.xml'
junit 'web/results.xml'
}
}
}
stage('Deploy') {
agent {
label 'linux'
}
steps {
unstash 'devpi'
sh 'service devpi stop'
sh 'rm -rf /mnt/data/backup'
sh 'devpi-server --export /mnt/data/backup'
sh 'find -iname devpi_server*.whl -exec pip install -U {} \\;'
sh 'find -iname devpi_web*.whl -exec pip install -U {} \\;'
sh 'service devpi start'
}
}
}
}