forked from theCapypara/riptide-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
36 lines (31 loc) · 1.31 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
pipeline {
agent any
options {
disableConcurrentBuilds()
}
stages {
// TODO: Build test
stage('Copy documentation') {
when {
// Only copy for master
expression { env.BRANCH_NAME == 'master' }
}
// Copy the documentation of all services into the documentation repository
steps {
dir("__riptide_docs") {
git url: '[email protected]:Parakoopa/riptide-docs.git', credentialsId: 'riptide-repo-ssh'
sh '../copy_docs.py'
sh 'git add source/repo_docs'
sshagent(credentials : ['riptide-repo-ssh']) {
sh 'git config core.sshCommand "ssh -v -o StrictHostKeyChecking=no"'
sh 'git config --global user.email "[email protected]"'
sh 'git config --global user.name "Riptide Repo Docs"'
sh 'git push --set-upstream origin master'
sh 'git commit -m "Riptide Repo documentation - Build for $(git rev-parse --short=8 ${GIT_COMMIT}) \n\nURL: https://github.com/Parakoopa/riptide-repo/commit/${GIT_COMMIT}" || true'
sh 'git push'
}
}
}
}
}
}