@@ -14,42 +14,30 @@ pipeline {
14
14
maven 'apache-maven-latest'
15
15
}
16
16
environment {
17
- // Filter out all the feature, test, and product IUs that are not published. Escape dots to match them literally
18
17
REPO = "${WORKSPACE}/repo"
19
18
PATH = "${installMavenDaemon('1.0.2')}/bin:${PATH}"
19
+ CBI_AGGR = "${installLatestCbiAggr()}"
20
20
// Folder ~/.m2 is not writable for builds, ensure mvnd metadata are written within the workspace.
21
21
// prevent jline warning about inability to create a system terminal and increase keep-alive timeouts to increase stability in concurrent usage
22
22
MVND = "mvnd -Dmvnd.daemonStorage=${WORKSPACE}/tools/mvnd -Dorg.jline.terminal.type=dumb -Dmvnd.keepAlive=1000 -Dmvnd.maxLostKeepAlive=600"
23
- ECLIPSE = "${installLatestEclipse()}"
24
- URL_AGG_UPDATES = 'https://download.eclipse.org/cbi/updates/p2-aggregator/products/nightly/latest'
25
23
}
26
24
// parameters declared in the definition of the invoking job
27
25
stages {
28
26
stage('Aggregate Maven repository') {
29
27
steps {
30
28
sh '''#!/bin/bash -e
31
- echo "==== Install and run the CBI aggregator ===="
32
-
33
- DIR_AGGREGATOR="${WORKSPACE}/tools/aggregator"
34
29
FILE_SDK_AGGR="${WORKSPACE}/git-repo/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr"
35
30
36
31
# Set whether this is a snapshot build or not
37
32
if [ "${snapshotOrRelease}" = "-snapshot" ]; then
38
33
sed -e 's/snapshot=".*"/snapshot="true"/g' -i ${FILE_SDK_AGGR}
39
34
fi
40
35
41
- echo "Installing the CBI aggregator into ${DIR_AGGREGATOR} ..."
42
- ${ECLIPSE} --launcher.suppressErrors -noSplash \\
43
- -application org.eclipse.equinox.p2.director \\
44
- -r ${URL_AGG_UPDATES} \\
45
- -d ${DIR_AGGREGATOR} -p CBIProfile \\
46
- -installIU org.eclipse.cbi.p2repo.cli.product
47
-
48
36
repoRaw="${WORKSPACE}/repo-raw"
49
37
mkdir ${repoRaw}
50
38
51
39
echo "Running the aggregator with build model ${FILE_SDK_AGGR} ..."
52
- "${DIR_AGGREGATOR}/cbiAggr " aggregate --buildModel ${FILE_SDK_AGGR} \\
40
+ "${CBI_AGGR} " aggregate --buildModel ${FILE_SDK_AGGR} \\
53
41
--action CLEAN_BUILD --buildRoot ${repoRaw} \\
54
42
-vmargs -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclientjava
55
43
@@ -78,8 +66,7 @@ pipeline {
78
66
}
79
67
}
80
68
stage('Validate repository') {
81
- // It prunes down the set of artifacts to be published, e.g., eliminate test artifacts,
82
- // and it tests that each to-be-published artifact can transitively resolve all its dependencies.
69
+ // Tests that each to-be-published artifact can transitively resolve all its dependencies.
83
70
steps {
84
71
dir('repo-validation') { // Do the work in a clean folder without a pom.xml
85
72
sh '''#!/bin/bash -xe
@@ -148,26 +135,15 @@ pipeline {
148
135
SOURCES_ARG="-Dsources=${sourcesFile}"
149
136
else
150
137
SOURCES_ARG=""
151
- # If the -sources.jar is missing, and the main jar contains .class files, then we won't be able to promote this to Maven central.
152
- if unzip -l ${file} | grep -q -e '.class$'; then
153
- echo "BUILD FAILURE ${file} contains .class files and requires a ${sourcesFile}"
154
- exit 1
155
- else
156
- echo "Missing ${sourcesFile} but ${file} contains no .class files."
157
- fi;
138
+ echo "No ${sourcesFile}."
158
139
fi
159
140
160
141
if [ -f "${javadocFile}" ]; then
161
142
echo "${javadocFile}"
162
143
JAVADOC_ARG="-Djavadoc=${javadocFile}"
163
144
else
164
145
JAVADOC_ARG=""
165
- if unzip -l ${file} | grep -q -e '.class$'; then
166
- echo "BUILD FAILURE ${file} contains .class files and requires a ${javadocFile}"
167
- exit 1
168
- else
169
- echo "Missing ${javadocFile} but ${file} contains no .class files."
170
- fi;
146
+ echo "No ${javadocFile}."
171
147
fi
172
148
set -x
173
149
@@ -204,15 +180,9 @@ def installMavenDaemon(String version) {
204
180
return install('mvnd', "https://downloads.apache.org/maven/mvnd/${version}/maven-mvnd-${version}-linux-amd64.tar.gz")
205
181
}
206
182
207
- def installLatestEclipse(){
208
- def props = null
209
- dir("${WORKSPACE}/git-repo") {
210
- props = readProperties(file: 'cje-production/buildproperties.txt').collectEntries{n, v ->
211
- v = v.trim();
212
- return [n, (v.startsWith('"') && v.endsWith('"') ? v.substring(1, v.length() - 1) : v)]
213
- }
214
- }
215
- return install('eclipse', "https://download.eclipse.org/eclipse/downloads/drops4/${props.PREVIOUS_RELEASE_ID}/eclipse-SDK-${props.PREVIOUS_RELEASE_VER}-linux-gtk-x86_64.tar.gz") + '/eclipse'
183
+
184
+ def installLatestCbiAggr(){
185
+ return install('cbiAggr', "https://download.eclipse.org/cbi/updates/p2-aggregator/products/nightly/latest/org.eclipse.cbi.p2repo.cli.product-linux.gtk.x86_64.tar.gz") + '/cbiAggr'
216
186
}
217
187
218
188
def install(String toolType, String url) {
0 commit comments