forked from davidgiga1993/mixing-station-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (44 loc) · 836 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
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 '/usr/local/bin/mkdocs build'
}
}
}
}
stage('Deploy') {
steps {
sh 'rsync -avh --no-perms --no-owner --no-group --delete site/ /var/www/ms-docs/'
}
}
}
}