Skip to content

Commit a999440

Browse files
committed
[Build] Make CBIaggregator.sh script more portable and inline properties
- Don't require it to run from $WORKSPACE/work. All work happens from the current working directory. - Remove absolute paths to invoked executables and rely on that they are on the PATH of the executing computer. This also helps if one runs this script e.g. on Windows under a POSIX environment. - Remove usage of 'BUILD_NUMBER' in name of assembled repository - Inline properties.sh
1 parent d53b825 commit a999440

File tree

4 files changed

+108
-125
lines changed

4 files changed

+108
-125
lines changed

JenkinsJobs/Releng/publishToMaven.jenkinsfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ pipeline {
1313
maven 'apache-maven-latest'
1414
}
1515
environment {
16-
REPO = "${WORKSPACE}/repo-${BUILD_NUMBER}"
16+
REPO = "${WORKSPACE}/repo"
1717
}
1818
// parameters declared in the definition of the invoking job
1919
stages {
2020
stage('Aggregate Maven repository') {
2121
steps {
2222
sh '''
23-
SCRIPT="${WORKSPACE}/work/CBIaggregator.sh"
24-
cp -r eclipse.platform.releng/publish-to-maven-central/ "${WORKSPACE}/work" #script currently expects ${WORKSPACE}/work, we cannot use another directory
23+
SCRIPT="eclipse.platform.releng/publish-to-maven-central/CBIaggregator.sh"
2524
chmod +x ${SCRIPT}
2625
${SCRIPT} ${snapshotOrRelease}
2726
'''
@@ -53,6 +52,9 @@ pipeline {
5352

5453
cat coordinates.txt
5554

55+
# Stop maven from searching the multi-module root further up the directory tree
56+
mkdir -p ${GIT_REL_PATH}.mvn
57+
5658
set -o pipefail
5759
for i in $(cat coordinates.txt); do
5860
# Get each artifact and all its transitive dependencies from the Mavenized repository.
@@ -105,7 +107,7 @@ pipeline {
105107
post {
106108
always {
107109
archiveArtifacts allowEmptyArchive: true, artifacts: '\
108-
repo-*/**, baseline-next.txt, \
110+
repo/**, baseline-next.txt, \
109111
repo-validation/coordinates.txt,\
110112
publish-*/.log/*'
111113
}

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ The actual steps to release
108108
- You can subscribe to [cross-project-issues](https://accounts.eclipse.org/mailing-list/cross-project-issues-dev) to get the notifications on Simrel releases.
109109
* #### **Publish to Maven central**
110110
- Publishing to maven should happen by at least Tuesday before the release since there is up to a 24 hour delay for the maven mirrors.
111-
- Update [SDK4Mvn.aggr](https://github.com/eclipse-platform/eclipse.platform.releng/blob/master/publish-to-maven-central/SDK4Mvn.aggr) and [properties.sh](https://github.com/eclipse-platform/eclipse.platform.releng/blob/master/publish-to-maven-central/properties.sh) to the release build.
111+
- Update [SDK4Mvn.aggr](https://github.com/eclipse-platform/eclipse.platform.releng/blob/master/publish-to-maven-central/SDK4Mvn.aggr) and [CBIaggregator.sh](https://github.com/eclipse-platform/eclipse.platform.releng/blob/master/publish-to-maven-central/CBIaggregator.sh) to the release build.
112112
- SDK4Mvn.aggr determines what is being published to Maven
113-
- Updating properties.sh determines which Eclipse version is used to run the CBI aggregator
113+
- Updating `CBIaggregator.sh` determines which Eclipse version is used to run the CBI aggregator
114114
- Run the [Publish to Maven](https://ci.eclipse.org/releng/job/Releng/job/PublishToMaven/) job in jenkins with the `-release` parameter.
115115
- Once that publish job has completed successfully, log into https://oss.sonatype.org/#stagingRepositories and close the Platform, JDT and PDE repositories.
116116
- If you do not have an account on oss.sonatype.org for performing the rest of the release request one by creating an issue like https://issues.sonatype.org/browse/OSSRH-43870 to get permissions for platform, JDT and PDE projects and tag an existing release engineer to give approval.

0 commit comments

Comments
 (0)