forked from castle-engine/castle-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.update-apidoc-unstable
43 lines (42 loc) · 1.57 KB
/
Jenkinsfile.update-apidoc-unstable
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
/* -*- mode: groovy -*-
Configure how to run our job in Jenkins.
See https://castle-engine.io/jenkins .
*/
pipeline {
agent { label 'jenkins-cge-apidoc-uploader' }
environment {
PATH = "${PATH}:${WORKSPACE}/pasdoc/bin/"
}
stages {
stage('Regenerate API Docs and Upload') {
when { branch "master" }
steps {
/* remove older PasDoc versions, so that later "tar xzvf pasdoc-*-linux-x86_64.tar.gz"
expands "tar xzvf pasdoc-*-linux-x86_64.tar.gz" only to one file.
This matters when PasDoc version change, e.g. from 0.15.0 to 0.16.0. */
sh 'rm -f pasdoc-*-linux-x86_64.tar.gz'
/* Use https://plugins.jenkins.io/copyartifact/ plugin to copy last pasdoc build into this build. */
copyArtifacts(projectName: 'pasdoc_organization/pasdoc/master', filter: 'pasdoc-*-linux-x86_64.tar.gz')
sh 'tar xzvf pasdoc-*-linux-x86_64.tar.gz'
sh 'make upload -C doc/pasdoc/'
}
}
}
post {
regression {
mail to: 'michalis@castle-engine.io',
subject: "[jenkins] Build started failing: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
failure {
mail to: 'michalis@castle-engine.io',
subject: "[jenkins] Build failed: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
fixed {
mail to: 'michalis@castle-engine.io',
subject: "[jenkins] Build is again successfull: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
}
}