-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathJenkinsfile
More file actions
85 lines (73 loc) · 2.61 KB
/
Copy pathJenkinsfile
File metadata and controls
85 lines (73 loc) · 2.61 KB
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
80
81
82
83
84
85
pipeline {
agent any
options {
// Quiet period en log-rotatie volledig in code gevangen
quietPeriod(120)
buildDiscarder(logRotator(daysToKeepStr: '40', numToKeepStr: '70'))
}
triggers {
// Zorgt ervoor dat het vinkje voor GitHub polling in de UI geactiveerd blijft
githubPush()
}
parameters {
string(name: 'goals', defaultValue: 'clean install', trim: false)
}
environment {
NODE_OPTIONS = '--max_old_space_size=4096'
TEAMS_WEBHOOK = credentials('servoy-teams-webhook')
}
tools {
jdk 'Java 21'
maven 'Maven 3.9.16'
}
stages {
stage('Checkout') {
steps {
// checkout scm haalt automatisch de juiste branch/commit op die de build triggerde
checkout scm
}
}
stage('Build with Tycho 5') {
steps {
wrap([$class: 'Xvfb', installationName: 'xvfb', autoDisplayName: true]) {
configFileProvider([
configFile(fileId: 'master_mvn_repo', variable: 'MAVEN_SETTINGS'),
configFile(fileId: 'maven_toolchain', variable: 'TOOLCHAIN')
]) {
sh 'export MAVEN_OPTS="-Dmaven.test.failure.ignore=true" && mvn -B -s "$MAVEN_SETTINGS" -t "$TOOLCHAIN" $goals'
}
}
}
}
}
post {
always {
// Karma unit testen archiveren
junit allowEmptyResults: false, testResults: 'com.servoy.eclipse.ngclient.ui/target/*karma.xml'
// HTML Publisher voor Coverage rapportages
publishHTML([
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'com.servoy.eclipse.ngclient.ui/target/coverage',
reportFiles: 'app/index.html,servoy-public/index.html',
reportName: 'Coverage',
reportTitles: ''
])
}
failure {
office365ConnectorSend webhookUrl: TEAMS_WEBHOOK, status: 'Failed'
}
unstable {
office365ConnectorSend webhookUrl: TEAMS_WEBHOOK, status: 'Unstable'
build job: 'build', wait: false
}
fixed {
office365ConnectorSend webhookUrl: TEAMS_WEBHOOK, status: 'Back to Normal'
}
success {
// Downstream project triggeren bij succes
build job: 'build', wait: false
}
}
}