forked from it-novum/openITCOCKPIT-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
35 lines (32 loc) · 1.07 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
pipeline {
agent any
stages {
stage('Build docker image') {
when {
branch 'main'
not {
changeRequest()
}
}
steps {
sh "docker build . -t openitcockpit/mkdocs"
}
}
stage('Build and deploy') {
when {
branch 'main'
not {
changeRequest()
}
}
steps {
sh 'docker run --rm -v "$PWD":/docs -w /docs/de openitcockpit/mkdocs /usr/bin/mkdocs build'
sh 'docker run --rm -v "$PWD":/docs -w /docs/en openitcockpit/mkdocs /usr/bin/mkdocs build'
sh 'mkdir -p htdocs/en'
sh 'cp -r de/site/. htdocs/'
sh 'cp -r en/site/. htdocs/en'
sh 'rsync -avz -e "ssh -o StrictHostKeyChecking=no -i /var/lib/jenkins/.ssh/id_rsa" --progress --delete ./htdocs/. www-data@srvoitcdocs01.ad.it-novum.com:/var/www/docs.openitcockpit.io/'
}
}
}
}