-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jenkinsfile
46 lines (45 loc) · 867 Bytes
/
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 any
parameters {
booleanParam(name: 'buildImage', defaultValue: false, description: 'Re-builds the docker image')
}
stages {
stage('Trigger setup') {
steps {
script {
properties([pipelineTriggers([githubPush()])])
}
}
}
stage('Checkout') {
steps {
git branch: 'master', url: 'https://github.com/davidgiga1993/mixing-station-docs.git'
}
}
stage('Build image'){
when {
expression {
return params.buildImage
}
}
steps {
sh 'docker build -t mkdocs-pdf:1.0 .'
}
}
stage('Building') {
steps {
script {
docker.image('mkdocs-pdf:1.0').inside {
sh 'python3 sort-nav.py'
sh '/usr/local/bin/mkdocs build'
}
}
}
}
stage('Deploy') {
steps {
sh 'rsync -avh --no-perms --no-owner --no-group --delete site/ /var/www/ms-docs/'
}
}
}
}