-
Notifications
You must be signed in to change notification settings - Fork 66
/
collectResults.groovy
128 lines (95 loc) · 4.83 KB
/
collectResults.groovy
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
122
123
124
125
126
127
128
job('Releng/ep-collectResults'){
displayName('Collect Results')
description('This job is to perform some summary analysis and then write unit test results to the download page.')
parameters {
stringParam('triggeringJob', null, 'Name of the job to collect results from: i.e. \'ep425I-unit-cen64-gtk3-java11\'.')
stringParam('buildURL', null, 'Build URL of the triggering job.')
stringParam('buildID', null, 'ID of the I-build being tested.')
}
label('centos-8')
logRotator {
daysToKeep(5)
numToKeep(10)
}
jdk('openjdk-jdk11-latest')
authenticationToken('collectResults')
wrappers { //adds pre/post actions
timestamps()
preBuildCleanup()
sshAgent('git.eclipse.org-bot-ssh', 'projects-storage.eclipse.org-bot-ssh')
timeout {
absolute(30)
}
withAnt {
installation('apache-ant-latest')
jdk('openjdk-jdk17-latest')
}
}
steps {
shell('''
#!/bin/bash -x
buildID=$(echo $buildID|tr -d ' ')
buildURL=$(echo $buildURL|tr -d ' ')
triggeringJob=$(echo $triggeringJob|tr -d ' ')
wget -O ${WORKSPACE}/buildproperties.shsource --no-check-certificate http://download.eclipse.org/eclipse/downloads/drops4/${buildID}/buildproperties.shsource
cat ${WORKSPACE}/buildproperties.shsource
source ${WORKSPACE}/buildproperties.shsource
epDownloadDir=/home/data/httpd/download.eclipse.org/eclipse
dropsPath=${epDownloadDir}/downloads/drops4
buildDir=${dropsPath}/${buildID}
workingDir=${epDownloadDir}/workingDir
workspace=${workingDir}/${JOB_BASE_NAME}-${BUILD_NUMBER}
ssh genie.releng@projects-storage.eclipse.org rm -rf ${workingDir}/${JOB_BASE_NAME}*
ssh genie.releng@projects-storage.eclipse.org mkdir -p ${workspace}
ssh genie.releng@projects-storage.eclipse.org cd ${workspace}
#get latest Eclipse platform product
epRelDir=$(ssh genie.releng@projects-storage.eclipse.org ls -d --format=single-column ${dropsPath}/R-*|sort|tail -1)
ssh genie.releng@projects-storage.eclipse.org tar -C ${workspace} -xzf ${epRelDir}/eclipse-platform-*-linux-gtk-x86_64.tar.gz
ssh genie.releng@projects-storage.eclipse.org PATH=/opt/public/common/java/openjdk/jdk-11_x64-latest/bin:$PATH ${workspace}/eclipse/eclipse -nosplash \\
-debug -consolelog -data ${workspace}/workspace-toolsinstall \\
-application org.eclipse.equinox.p2.director \\
-repository ${ECLIPSE_RUN_REPO},${BUILDTOOLS_REPO},${WEBTOOLS_REPO} \\
-installIU org.eclipse.platform.ide,org.eclipse.pde.api.tools,org.eclipse.releng.build.tools.feature.feature.group,org.eclipse.wtp.releng.tools.feature.feature.group \\
-destination ${workspace}/basebuilder \\
-profile SDKProfile
ssh genie.releng@projects-storage.eclipse.org rm -rf ${workspace}/eclipse
#get requisite tools
ssh genie.releng@projects-storage.eclipse.org wget -O ${workspace}/collectTestResults.xml https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.releng.aggregator/master/cje-production/scripts/collectTestResults.xml
ssh genie.releng@projects-storage.eclipse.org wget -O ${workspace}/publish.xml https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.releng.aggregator/master/cje-production/scripts/publish.xml
cd ${WORKSPACE}
git clone https://github.com/eclipse-platform/eclipse.platform.releng.aggregator.git
cd ${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder
scp -r eclipse genie.releng@projects-storage.eclipse.org:${workspace}/eclipse
cd ${WORKSPACE}
#triggering ant runner
baseBuilderDir=${workspace}/basebuilder
javaCMD=/opt/public/common/java/openjdk/jdk-11_x64-latest/bin/java
launcherJar=$(ssh genie.releng@projects-storage.eclipse.org find ${baseBuilderDir}/. -name "org.eclipse.equinox.launcher_*.jar" | sort | head -1 )
scp genie.releng@projects-storage.eclipse.org:${buildDir}/buildproperties.shsource .
source ./buildproperties.shsource
devworkspace=${workspace}/workspace-antRunner
ssh genie.releng@projects-storage.eclipse.org ${javaCMD} -jar ${launcherJar} -nosplash -consolelog -debug -data $devworkspace -application org.eclipse.ant.core.antRunner -file ${workspace}/collectTestResults.xml \\
-DpostingDirectory=${dropsPath} \\
-Djob=${triggeringJob} \\
-DbuildURL=${buildURL} \\
-DbuildID=${buildID} \\
-DEBUILDER_HASH=${EBUILDER_HASH}
#
devworkspace=${workspace}/workspace-updateTestResults
ssh genie.releng@projects-storage.eclipse.org ${javaCMD} -jar ${launcherJar} -nosplash -consolelog -debug -data $devworkspace -application org.eclipse.ant.core.antRunner -file ${workspace}/publish.xml \\
-DpostingDirectory=${dropsPath} \\
-Djob=${triggeringJob} \\
-DbuildID=${buildID} \\
-DeclipseStream=${STREAM} \\
-DEBuilderDir=${workspace}
#Delete Workspace
ssh genie.releng@projects-storage.eclipse.org rm -rf ${workingDir}/${JOB_BASE_NAME}*
''')
}
publishers {
extendedEmail {
recipientList("sravankumarl@in.ibm.com")
}
downstream('Releng/updateIndex', 'SUCCESS')
}
}