@@ -14,42 +14,30 @@ pipeline {
1414 maven 'apache-maven-latest'
1515 }
1616 environment {
17- // Filter out all the feature, test, and product IUs that are not published. Escape dots to match them literally
1817 REPO = "${WORKSPACE}/repo"
1918 PATH = "${installMavenDaemon('1.0.2')}/bin:${PATH}"
19+ CBI_AGGR = "${installLatestCbiAggr()}"
2020 // Folder ~/.m2 is not writable for builds, ensure mvnd metadata are written within the workspace.
2121 // prevent jline warning about inability to create a system terminal and increase keep-alive timeouts to increase stability in concurrent usage
2222 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'
2523 }
2624 // parameters declared in the definition of the invoking job
2725 stages {
2826 stage('Aggregate Maven repository') {
2927 steps {
3028 sh '''#!/bin/bash -e
31- echo "==== Install and run the CBI aggregator ===="
32-
33- DIR_AGGREGATOR="${WORKSPACE}/tools/aggregator"
3429 FILE_SDK_AGGR="${WORKSPACE}/git-repo/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr"
3530
3631 # Set whether this is a snapshot build or not
3732 if [ "${snapshotOrRelease}" = "-snapshot" ]; then
3833 sed -e 's/snapshot=".*"/snapshot="true"/g' -i ${FILE_SDK_AGGR}
3934 fi
4035
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-
4836 repoRaw="${WORKSPACE}/repo-raw"
4937 mkdir ${repoRaw}
5038
5139 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} \\
5341 --action CLEAN_BUILD --buildRoot ${repoRaw} \\
5442 -vmargs -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclientjava
5543
@@ -78,8 +66,7 @@ pipeline {
7866 }
7967 }
8068 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.
8370 steps {
8471 dir('repo-validation') { // Do the work in a clean folder without a pom.xml
8572 sh '''#!/bin/bash -xe
@@ -148,26 +135,15 @@ pipeline {
148135 SOURCES_ARG="-Dsources=${sourcesFile}"
149136 else
150137 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}."
158139 fi
159140
160141 if [ -f "${javadocFile}" ]; then
161142 echo "${javadocFile}"
162143 JAVADOC_ARG="-Djavadoc=${javadocFile}"
163144 else
164145 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}."
171147 fi
172148 set -x
173149
@@ -204,15 +180,9 @@ def installMavenDaemon(String version) {
204180 return install('mvnd', "https://downloads.apache.org/maven/mvnd/${version}/maven-mvnd-${version}-linux-amd64.tar.gz")
205181}
206182
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'
216186}
217187
218188def install(String toolType, String url) {
0 commit comments