forked from castle-engine/castle-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.windows
79 lines (77 loc) · 2.36 KB
/
Jenkinsfile.windows
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* -*- mode: groovy -*-
Confgure how to run our job in Jenkins.
This runs on Windows.
See https://github.com/castle-engine/castle-engine/wiki/Cloud-Builds-(Jenkins) .
*/
library 'cag-shared-jenkins-library'
pipeline {
options {
/* While concurrent builds of CGE work OK,
they stuck Jenkins much with too many long-running builds.
Better to wait for previous build to finish. */
disableConcurrentBuilds()
}
agent {
label 'windows-cge-builder'
}
environment {
/* Used by CGE build tool ("castle-engine").
Define env based on another env variable.
According to https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/110
this should be supported. */
CASTLE_ENGINE_PATH = "${WORKSPACE}"
PATH = "${PATH};${CASTLE_ENGINE_PATH}/installed/bin/" // Note: on Windows, PATH is separated by ;
}
stages {
stage('Info') {
steps {
// check versions (and availability) of our requirements early
sh 'fpc -iV'
sh 'lazbuild --version'
sh 'make --version'
}
}
stage('Build Tools') {
steps {
sh 'rm -Rf installed/'
sh 'mkdir -p installed/'
sh 'make clean tools install PREFIX=${CASTLE_ENGINE_PATH}/installed/'
}
}
stage('Build Examples') {
steps {
sh 'make clean examples'
}
}
stage('Build And Run Auto-Tests') {
steps {
sh 'make tests'
}
}
stage('Build Using FpMake') {
steps {
sh 'make clean test-fpmake'
}
}
}
post {
//success {
/* archiveArtifacts artifacts: 'escape_universe-*.tar.gz,escape_universe-*.zip,escape_universe*.apk,web-story/test_escape_universe_story-*.zip,web-story/test_escape_universe_story-*.tar.gz' */
//}
regression {
mail to: '[email protected]',
subject: "[jenkins] Build started failing: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
failure {
mail to: '[email protected]',
subject: "[jenkins] Build failed: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
fixed {
mail to: '[email protected]',
subject: "[jenkins] Build is again successful: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
}
}