-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
121 lines (116 loc) · 2.8 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
pipeline {
agent {
label 'centos-latest'
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
timestamps()
}
tools {
maven 'apache-maven-latest'
jdk 'temurin-jdk17-latest'
}
environment {
// Target platform to build against (must correspond to a profile in the parent pom.xml)
PLATFORM = 'platform-2023-03'
}
stages {
stage ('Nightly') {
when {
allOf {
not {
branch 'PR-*'
}
not {
tag "*"
}
}
}
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
xrandr
xrandr -s 1440x900
xsetroot -solid grey
vncconfig -iconic &
xhost +
sleep 2
metacity --replace --sm-disable --display=${DISPLAY} &
sleep 2
mvn clean verify -P$PLATFORM -Psign -Dmaven.wagon.provider.http=httpclient -Dmaven.artifact.threads=12 -Dhttp.tcp.nodelay=false
'''
}
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
chmod +x ./releng/org.eclipse.acceleo.releng/publish-nightly.sh
./releng/org.eclipse.acceleo.releng/publish-nightly.sh
'''
}
}
}
stage ('Tag') {
when {
allOf {
not {
branch 'PR-*'
}
tag "*"
}
}
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
xrandr
xrandr -s 1440x900
xsetroot -solid grey
vncconfig -iconic &
xhost +
sleep 2
metacity --replace --sm-disable --display=${DISPLAY} &
sleep 2
mvn clean verify deploy:deploy -P$PLATFORM -Psign -Dmaven.wagon.provider.http=httpclient -Dmaven.artifact.threads=12 -Dhttp.tcp.nodelay=false
'''
}
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
chmod +x ./releng/org.eclipse.acceleo.releng/publish-nightly.sh
./releng/org.eclipse.acceleo.releng/publish-nightly.sh
'''
}
}
}
stage ('PR Verify') {
when {
branch 'PR-*'
}
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
xrandr
xrandr -s 1440x900
xsetroot -solid grey
vncconfig -iconic &
xhost +
sleep 2
metacity --replace --sm-disable --display=${DISPLAY} &
sleep 2
mvn clean verify -P$PLATFORM -Dmaven.wagon.provider.http=httpclient -Dmaven.artifact.threads=12 -Dhttp.tcp.nodelay=false
'''
}
}
}
}
post {
always {
junit "tests/*.test*/target/surefire-reports/*.xml,query/tests/*.test*/target/surefire-reports/*.xml"
}
unsuccessful {
emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':
Check console output at ${env.BUILD_URL}""",
to: 'laurent.goubet@obeo.fr, yvan.lussaud@obeo.fr'
)
}
}
}