Skip to content

Commit

Permalink
[Build] Make CBIaggregator.sh script more portable and inline properties
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
HannesWell committed Jan 3, 2025
1 parent d53b825 commit a999440
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 125 deletions.
10 changes: 6 additions & 4 deletions JenkinsJobs/Releng/publishToMaven.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ pipeline {
maven 'apache-maven-latest'
}
environment {
REPO = "${WORKSPACE}/repo-${BUILD_NUMBER}"
REPO = "${WORKSPACE}/repo"
}
// parameters declared in the definition of the invoking job
stages {
stage('Aggregate Maven repository') {
steps {
sh '''
SCRIPT="${WORKSPACE}/work/CBIaggregator.sh"
cp -r eclipse.platform.releng/publish-to-maven-central/ "${WORKSPACE}/work" #script currently expects ${WORKSPACE}/work, we cannot use another directory
SCRIPT="eclipse.platform.releng/publish-to-maven-central/CBIaggregator.sh"
chmod +x ${SCRIPT}
${SCRIPT} ${snapshotOrRelease}
'''
Expand Down Expand Up @@ -53,6 +52,9 @@ pipeline {

cat coordinates.txt

# Stop maven from searching the multi-module root further up the directory tree
mkdir -p ${GIT_REL_PATH}.mvn

set -o pipefail
for i in $(cat coordinates.txt); do
# Get each artifact and all its transitive dependencies from the Mavenized repository.
Expand Down Expand Up @@ -105,7 +107,7 @@ pipeline {
post {
always {
archiveArtifacts allowEmptyArchive: true, artifacts: '\
repo-*/**, baseline-next.txt, \
repo/**, baseline-next.txt, \
repo-validation/coordinates.txt,\
publish-*/.log/*'
}
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ The actual steps to release
- You can subscribe to [cross-project-issues](https://accounts.eclipse.org/mailing-list/cross-project-issues-dev) to get the notifications on Simrel releases.
* #### **Publish to Maven central**
- 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.
- 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.
- 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.
- SDK4Mvn.aggr determines what is being published to Maven
- Updating properties.sh determines which Eclipse version is used to run the CBI aggregator
- Updating `CBIaggregator.sh` determines which Eclipse version is used to run the CBI aggregator
- Run the [Publish to Maven](https://ci.eclipse.org/releng/job/Releng/job/PublishToMaven/) job in jenkins with the `-release` parameter.
- Once that publish job has completed successfully, log into https://oss.sonatype.org/#stagingRepositories and close the Platform, JDT and PDE repositories.
- 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.
Expand Down
Loading

0 comments on commit a999440

Please sign in to comment.