Skip to content

Commit

Permalink
[Build] Update, clean-up and use job for Maven publication
Browse files Browse the repository at this point in the history
Currently the publication of the Maven artifacts of Eclipse happens in
five jobs manually/directly defined in the 'Releng' Jenkins instance:
1. CBIaggregator
2. RepositoryValidator
3. PublishPlatformToMaven, PublishJDTtoMaven and PublishPDEToMaven

Corresponding job-definitions for these jobs already exist in this SCM
(except for the repository-validation), but the jobs generated from them
(in the 'Releng' folder instead of the root) are not used.

This change replaces the existing (unused) multiple job-definitions by a
single Jenkins pipeline that contains all steps and performs the final
publication for all covered projects in a single matrix.
The new pipeline is updated to incorporate all the changes made in the
meantime to the manually maintained publication jobs.

The I-build job is changed to use the new publication job.

With respect to the existing, manually maintained publication job, the
new job is adjusted in the following aspects:

- Rename job to just 'PublishToMaven'. The CBI part by itself is
irrelevant and a tool in the publication process
- Remove documentation about the jobs involved and scripts called from
the job description as it's an implementation detail that can be looked
up in the pipeline if of interest.
- Don't require the 'projects-storage.eclipse.org-bot-ssh' SSH agent for
the aggregation step.
- Only run publication on explicit invocation (from I-builds). Remove
the timer-trigger: Without changes a (re-)publication is not necessary.
  • Loading branch information
HannesWell committed Jan 2, 2025
1 parent 363fd59 commit b467438
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 346 deletions.
2 changes: 1 addition & 1 deletion JenkinsJobs/Builds/build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ spec:
}
}
steps {
build job: 'CBIaggregator', parameters: [string(name: 'snapshotOrRelease', value: '-snapshot')], wait: false
build job: 'Releng/PublishToMaven', parameters: [choice(name: 'snapshotOrRelease', value: 'snapshot')], wait: false
}
}
}
Expand Down
93 changes: 0 additions & 93 deletions JenkinsJobs/Releng/CBIaggregator.groovy

This file was deleted.

59 changes: 59 additions & 0 deletions JenkinsJobs/Releng/FOLDER.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
folder('Releng') {
description('Jobs related to routine releng tasks. Some are periodic, some are "manual" jobs ran only when needed.')
}

pipelineJob('Releng/PublishToMaven'){
displayName('Publish to Maven')
description('''\
<p>
This job uses the <a href="https://github.com/eclipse-cbi/p2repo-aggregator">CBI aggregator</a> to produce a Maven-compatible repository
with contents as specified by the <a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/master/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr">SDK4Mvn.aggr</a> and
then publishes the artifacts for <code>Eclipse-Platform</code>, <code>JDT</code> and <code>PDE</code> from the output:
</p>
<ul>
<li>
Snapshots are published to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
</li>
<li>
Releases are published to <a href="https://repo1.maven.org/maven2/org/eclipse/">Maven central</a> by publishing to a <a href="https://oss.sonatype.org/#stagingRepositories">staging repository</a>.
</li>
</ul>
<p>
The source repository to be published is specified via the
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L5">local</a> and
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L8">remote</a> repository locations.
<b>
For a release build, these should specify the release repository location.
After the release, these should specify the current 4.x-I-Builds.
</b>
</p>
''')
parameters { // Define parameters in job configuration to make them available even for the very first build after this job was (re)created.
choiceParam('snapshotOrRelease', ['-snapshot' /*default*/, '-release'], '''\
<p>
The source repository to be published is specified via the
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L5">local</a> and
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L8">remote</a> repository locations
the <a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/master/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr">SDK4Mvn.aggr</a>.
<b>
For a release build, these should specify the release repository location.
After the release, these should specify the current 4.x-I-Builds.
</b>
</p>
<ul>
<li>
Snapshots are published to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
</li>
<li>
Releases are published to <a href="https://repo1.maven.org/maven2/org/eclipse/">Maven central</a> by publishing to a <a href="https://oss.sonatype.org/#stagingRepositories">staging repository</a>.
</li>
</ul>
''')
}
definition {
cpsScm {
lightweight(true)
scm {
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
}
scriptPath('JenkinsJobs/Releng/publishToMaven.jenkinsfile')
}
}
}
76 changes: 0 additions & 76 deletions JenkinsJobs/Releng/PublishJDTtoMaven.groovy

This file was deleted.

78 changes: 0 additions & 78 deletions JenkinsJobs/Releng/PublishPDEToMaven.groovy

This file was deleted.

Loading

0 comments on commit b467438

Please sign in to comment.