-
Notifications
You must be signed in to change notification settings - Fork 129
/
.Jenkinsfile
46 lines (44 loc) · 1.17 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
pipeline {
agent {
docker {
image 'ubuntu_tester'
args '-u root:root -v ${HOME}/html/docs:/docs -v ${HOME}/html/_ci:/ci'
}
}
environment {
PJ_NAME = 'fitlog'
POST_URL = 'https://open.feishu.cn/open-apis/bot/v2/hook/ab4aa33b-1c7a-403c-8a83-fdc27fc9d8d1'
}
stages {
stage('Package Installation') {
steps {
sh 'python setup.py install'
}
}
stage('Parallel Stages') {
parallel {
stage('Document Building') {
steps {
sh 'cd docs && make prod'
sh 'rm -rf /docs/${PJ_NAME}'
sh 'mv docs/build/html /docs/${PJ_NAME}'
}
}
stage('Package Testing') {
steps {
sh 'pytest ./tests --html=test_results.html --self-contained-html'
}
}
}
}
}
post {
failure {
sh 'post 1'
}
success {
sh 'post 0'
sh 'post github'
}
}
}