forked from kuralabs/flowbber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
56 lines (51 loc) · 1.4 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
pipeline {
agent none
stages {
stage('Build') {
agent {
docker {
image 'kuralabs/flowbber:latest'
args '--init'
}
}
environment {
GITHUB_TOKEN = credentials('GITHUB_TOKEN')
}
steps {
sh '''
tox -e build
tox -e test
tox -e doc
'''
stash name: 'docs', includes: '.tox/env/tmp/html/**/*'
}
}
stage('Publish') {
agent { label 'docs' }
when { branch 'master' }
steps {
unstash 'docs'
sh '''
umask 022
mkdir -p /deploy/docs/flowbber
rm -rf /deploy/docs/flowbber/*
cp -R .tox/env/tmp/html/* /deploy/docs/flowbber/
'''
}
}
}
post {
success {
slackSend (
color: '#00FF00',
message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
)
}
failure {
slackSend (
color: '#FF0000',
message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
)
}
}
}