/
Jenkinsfile.test-demo-models
63 lines (62 loc) · 1.97 KB
/
Jenkinsfile.test-demo-models
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
/* -*- mode: groovy -*-
Configure how to run our job in Jenkins.
See https://castle-engine.io/cloud_builds_jenkins .
*/
pipeline {
options {
/* We do not really have a problem with concurrent builds,
but it seems that job can be created many many times in Jenkins and get stuck.
Using disableConcurrentBuilds as a workaround. */
disableConcurrentBuilds()
}
triggers {
pollSCM('H/4 * * * *')
upstream(upstreamProjects: 'castle_game_engine_organization/castle-engine-cloud-builds-tools/master', threshold: hudson.model.Result.SUCCESS)
}
agent {
docker {
image 'kambi/castle-engine-cloud-builds-tools:cge-unstable'
}
}
stages {
stage('Get demo-models') {
steps {
sh 'rm -Rf demo-models/'
sh 'git clone --depth 1 --single-branch --branch master https://github.com/castle-engine/demo-models'
}
}
stage('Build') {
steps {
sh 'make'
}
}
stage('Run Tests') {
steps {
sh 'jenkins_scripts/run_tests_on_dir_and_compare.sh demo-models/'
}
}
}
post {
always {
/* We save output always, also in case of failure,
because it is useful (to analyze, to update jenkins_scripts/run_tests_valid_output.txt)
even in case of failure. */
archiveArtifacts artifacts: 'run_tests_output.txt,run_tests_output_verbose.txt'
}
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}"
}
}
}