Skip to content

Commit 2fc0d5b

Browse files
committed
Adapt Release and RelEng documentation to reworked release automation
Update the main preparation PR to include all remaining steps and to include further instructions. That PR in this repository then also acts as replacement for the issue tracking the preparation.
1 parent a6b0db7 commit 2fc0d5b

8 files changed

Lines changed: 138 additions & 179 deletions

File tree

JenkinsJobs/Builds/dockerImages.jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Constants read by
1+
// Constants read by job creation
22
private static final _JOB_DESCRIPTION = 'Build and publish custom Docker images'
33

44
pipeline {

JenkinsJobs/Builds/markBuild.jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Constants read by
1+
// Constants read by job creation
22
private static final _JOB_DESCRIPTION = 'Mark a build as stable/unstable or to (not to) be kept indefinitely.'
33

44
pipeline {

JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,24 @@ pipeline {
348348
def prBranch = "prepare-R${NEXT_RELEASE_VERSION}"
349349
def aggregatorPreparationPR = githubAPI.createPullRequest('eclipse-platform/eclipse.platform.releng.aggregator', prHeadline, """\
350350
Prepare development of Eclipse ${NEXT_RELEASE_VERSION}.
351-
This includes:
351+
352+
This includes, but is not limited to:
352353
- Updating the version of the Maven parent, all references to it and the Eclipse products to `${NEXT_RELEASE_VERSION}`
353354
- Updating the release version to `${NEXT_RELEASE_VERSION}` across build scripts
354355
- Updating the previous release version to the current Release-Candidate: `${PREVIOUS_RELEASE_CANDIDATE_ID}`
356+
357+
Further tasks:
358+
- [ ] Review and submit all PRs created in the submodules to prepare them for the new release cycle.
359+
These PRs are all linked to this one.
360+
- [ ] Review and submit the new N&N pages created for the [eclipse website](https://github.com/eclipse-platform/www.eclipse.org-eclipse/pulls) repository.
361+
- [ ] Submit this PR.
362+
Before the preparation PRs in all submodules have been submitted the build of this change cannot complete (this can still submit it before).
363+
- [ ] Update build calendar for platform ${NEXT_RELEASE_VERSION} release cycle.
364+
365+
After this and all submodule PRs are submitted:
366+
- [ ] Run the [`Create Jobs`](https://ci.eclipse.org/releng/job/CreateJobs/) seed job to create the Jenkins jobs of the new stream
367+
- [ ] Start the new [`I-build-${NEXT_RELEASE_VERSION}`](https://ci.eclipse.org/releng/job/Builds/job/I-build-${NEXT_RELEASE_VERSION}/) job for the first I-build of the new stream
368+
- In case the new I-build job is not sufficiently stable, disable it temporarily until it's ready for the usual schedule
355369
""".stripIndent(), prBranch)
356370

357371
utilities.forEachGitSubmodule{ submodulePath ->

JenkinsJobs/seedJob.jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pipeline {
8989
if (jobDef.parameters != null && !jobDef.parameters.isEmpty()) {
9090
parameters {
9191
for (parameter in jobDef.parameters) {
92-
switch(parameter.type) {
92+
switch (parameter.type) {
9393
case 'string':
9494
stringParam {
9595
name(parameter.name)

RELEASE.md

Lines changed: 60 additions & 88 deletions
Large diffs are not rendered by default.

RELENG.md

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,75 @@
11
# Jenkins
22

3-
## **Job Creation with Job DSL**
3+
## Job Creation with Job DSL
44

5-
**Create Jobs**
5+
### Create Jobs
66

7-
The [Create Jobs](https://ci.eclipse.org/releng/job/CreateJobs/) job is used to populate the jenkins subfolders with the jobs defined in [JenkinsJobs](JenkinsJobs) groovy files.
8-
There are 2 Process Job DSLs steps, the first looks for FOLDER.groovy files and creates the folders, the second creates the jobs themselves.
7+
The [Create Jobs](https://ci.eclipse.org/releng/job/CreateJobs/) job is used to populate the Jenkins subfolders with the jobs defined in [JenkinsJobs](JenkinsJobs).
8+
It is defined in [`JenkinsJobs/seedJob.jenkinsfile`](JenkinsJobs/seedJob.jenkinsfile).
99

10-
Create Jobs *must be run manually*. Unfortunately JobDSL needs to be run by a specific user, so the build cannot be automatically started by a timer or when it detects jenkins changes without installing an additional plugin like [Authorize Project](https://plugins.jenkins.io/authorize-project/)) which supposedly still works but is abandoned and I (Sam) have not had time to investigate further or find alternatives. This means that while any committer can make changes to the Jenkins Jobs in git, someone with Jenkins rights will have to start the build to implement those changes.
10+
Create Jobs *must be run manually*.
11+
Unfortunately JobDSL needs to be run by a specific user, so the build cannot be automatically started by a timer or when it detects jenkins changes without installing an additional Plug-in (like [Authorize Project](https://plugins.jenkins.io/authorize-project/)) which supposedly still works but is abandoned.
12+
This means that while any committer can make changes to the Jenkins Jobs in git, someone with Jenkins permissions will have to start the build to implement those changes.
1113

1214
Obsolete jobs have to be deleted manually.
1315
They are not deleted automatically as some may be are still in use for a short time (e.g. Y-builds if a java-release is imminent) or to serve as reference in case the new jobs have problems.
1416

15-
**The JenkinsJobs Folder**
17+
### The JenkinsJobs Folder
1618

1719
As a general rule, the [JenkinsJobs](./JenkinsJobs) folder should match the layout of Jenkins itself.
18-
Every subfolder should contain one `.jenkinsfile` per individual pipeline.
19-
20-
Note: JobDSL does also support the creation of Views, so those can be added at some point but someone will either have to manually keep them up to date with the desired jobs or write a script to keep them up-to-date.
21-
22-
Many jobs have the release version in the job name because it is required for results parsing (i.e. the [automated tests](https://ci.eclipse.org/releng/job/AutomatedTests/)).
23-
In order to minimize manual labor the currently active streams are listed in the [buildConfigurations.json](JenkinsJobs/buildConfigurations.json) file.
24-
Version dependent jobs then parse this file during creation and make a job for each stream.
20+
Every subfolder contains a `.jenkinsfile` file for each individual job.
21+
The folders containing the individual job definitions are replicated in the Jenkins instance.
22+
Labels and descriptions of the folders implied by that structure can be specified in the [Seed Job](JenkinsJobs/seedJob.jenkinsfile):
23+
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/9a0ef15799eb3420d748a54d8719ca08c3c7b5af/JenkinsJobs/seedJob.jenkinsfile#L19-L26
24+
25+
Multiple build and test jobs have the release version in the job name because it is required for result parsing, e.g. the [automated tests](https://ci.eclipse.org/releng/job/AutomatedTests/).
26+
In order to minimize constant adjustments of the job definitions the active streams are configured through the [buildConfigurations.json](JenkinsJobs/buildConfigurations.json) file.
27+
This file is used to create the versioned build and test jobs and is also read by these jobs during their execution for detailed configuration.
28+
29+
### New Jobs
30+
31+
Adding a job to Jenkins should be as easy as adding a new `.jenkinsfile` file to git, but here are some general points to consider.
32+
33+
- Use **only CamelCase in filenames**, no spaces or dashes (it breaks JobDSL).
34+
- The job Names/IDs (used in the job URL) are the same as the names of the `.jenkinsfile` files, without `.jenkinsfile` extension.
35+
- The display names are derived from that filenames by inserting spaces before each uppercase letter.
36+
- The generated display name can be overwritten by a static `_JOB_DISPLAY_NAME` field.
37+
- Similarly the job's description can be defined using a static `_JOB_DESCRIPTION` field.
38+
39+
* **Script Formatting** You can use `'''`triple apostrophes`'''` to define multiline scripts. It's best to append a back-slash to prevent a blank line at the top of the script step in Jenkins.
40+
* To see what plugins are installed and what methods are available in the Releng Jenkins you can consult the [api viewer](https://ci.eclipse.org/releng/plugin/job-dsl/api-viewer/index.html).
2541

26-
**New Jobs**
42+
### Testing new Jobs or trying out changes before production
2743

28-
Adding a job to Jenkins should be as easy as adding a new groovy file to git, but here are some general pointers.
44+
Just like regular code, new changes or changes on jobs should be tested in a 'testing' environment before being used in production.
45+
As we don't have a dedicated testing environment, the regular [RelEng Jeninks](https://ci.eclipse.org/releng/) has to be used,
46+
but one can use a 'testing' copy of the final job that doesn't have any effect on the production environment.
47+
A testing job has to be created manually in the Jenkins UI and will only exist temporarily for the time of testing.
48+
It's recommended to put your name in the job's name to help others identifying the responsible person, in case you forgot to clean it up later.
49+
In the testing job you can use another source for the Jenkins file, for example your fork of this repo and another branch.
2950

30-
* **No dashes in filenames**, it breaks JobDSL. If there was a `-` in the job name I changed it to `_` in the file name.
31-
* **Job Names**
32-
- No spaces, this is just for the good of scripts etc. The job NAME is used in the url, but you can always add a `displayName` field if you want the job to appear with a more natural looking name on the page. See (Releng/deployToMaven)[JenkinsJobs/Releng/FOLDER.groovy] as an example.
33-
- The folder needs to be part of the job name, otherwise Jenkins will just create the job at the dashboard level.
34-
* **job vs pipelineJob**
35-
- Anything that can build on a regular jenkins node or via an available lable uses the [job](https://jenkinsci.github.io/job-dsl-plugin/#path/job) template.
36-
- Anything that defines its own kubernetes pod needs to be a [pipelineJob](https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob)
37-
* **Script Formatting** You can use `'''`triple apostrophes`'''` to define multiline scripts. I've found it's best to start the script on the same line and not the next, otherwise you end up with blank space at the top of the script step in Jenkins which can break the build (like the arm64 smoke tests).
38-
* To see what plugins are installed and what methods are available in the Releng Jenkins you can consult the [api viewer](https://ci.eclipse.org/releng/plugin/job-dsl/api-viewer/index.html).
51+
**Make sure your testing job does not have an effect on the production environment**
3952

53+
'Disable' all steps that have any effect on the production environment or redirect them to a testing environment too
54+
- Disable `git push`. Use `--dry-run` or comment out
55+
- Disable modification at the download server via `ssh` or `scp` or redirect changes to a 'try-out' area, which is hidden from the public
56+
- Some jobs already have a `DRY_RUN` parameter that deploy to `https://download.eclipse.org/eclipse/try-outs/`.
57+
- Don't send mails to mailing lists via the `emailext` step, instead just send a mail to your private mail directly.
58+
- Disable triggers for other jobs that may modify the production environment
4059

4160
# Updating Java Versions
4261

43-
Every 6 months there is a new Java release which requires additional builds and testing. The java release usually corresponds to odd numbered streams so a new java version would be tested in additional builds run during the 4.25 stream and then included in the 4.26 release I-builds.
62+
Every 6 months there is a new Java release which requires additional builds and testing.
63+
The Java release usually corresponds to odd numbered streams so a new Java version would be tested in separated builds run during the 4.41 stream and will then be included in the main line of the 4.42 release.
4464

45-
## **Y and P Builds**
46-
The **Y-build** is a full sdk build with the new java version for testing.
65+
## Y and P Builds
66+
The **Y-build** is a full Eclipse-SDK build with the support of the new Java version included for testing.
4767

48-
The **P-build** is a patch build that contains modified plugins designed to be installed on top of the current I-build to test the new java version.
68+
The **P-build** is a patch build that contains modified plugins designed to be installed on top of the current I-build to use the new java version support as early as possible.
4969
They are now managed by the JDT-project itself in [org.eclipse.jdt.releng](https://github.com/eclipse-jdt/eclipse.jdt/tree/master/org.eclipse.jdt.releng).
5070

51-
The builds themselves and their unit tests are in the [build.jenkinsfile](./JenkinsJobs/Builds/build.jenkinsfile) in GitHub and the [Y Builds](https://ci.eclipse.org/releng/job/YBuilds/) folder in jenkins.
71+
The Y-build themselves and their unit tests are, just like the regular I-builds, defined in the [build.jenkinsfile](./JenkinsJobs/Builds/build.jenkinsfile) respectively the [integrationTests.jenkinsfile](./JenkinsJobs/AutomatedTests/integrationTests.jenkinsfile) in git
72+
and used for the [Y Builds](https://ci.eclipse.org/releng/job/YBuilds/) folder in Jenkins.
5273

5374
## Setting Up New Builds
5475

scripts/GAReleasePrep.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ while [[ "$#" -gt 0 ]]; do
1818
esac
1919
done
2020

21-
MAJOR="${STREAM%.*}"
22-
MINOR="${STREAM#*.}"
23-
2421
TITLE="Release ${STREAM}"
2522

2623
BODY="Umbrella bug to track release activities for ${STREAM}
2724
For previous bug please refer to eclipse-platform/eclipse.platform.releng.aggregator#${PREV_ISSUE}.
2825
29-
3026
- [ ] Readme file for ${STREAM}
31-
- [ ] ${STREAM} Acknowledgements
3227
- [ ] Migration Guide
33-
- [ ] SWT Javadoc bash for ${STREAM}
28+
- [ ] Ensure the build is cleared of comparator errors in doc bundles before RC2 build
29+
- [ ] Preparation of the subsequent development cycle
30+
- After RC2 was promoted, run the [`Prepare Next Development Cycle`](https://ci.eclipse.org/releng/job/Releng/job/prepareNextDevCycle/) Jenkins job and complete the tasks listed in the PR created by it in this repository.
31+
- [ ] Run it with final parameters as `dry-run` (ideally shortly) before and verify correctnes.
32+
3433
- [ ] Publish ${STREAM} to Maven central
34+
- The final publication should be done one or two days before the release to ensure everything is mirrored at the time of release.
3535
- [ ] Contribute ${STREAM} to SimRel
36-
- [ ] Clean up intermediate artifacts (milestones, I-builds and old releases)
37-
38-
@notifications:
39-
@SDawley, @lshanmug, @SarikaSinha, @ktatavarthi, @niraj-modi
36+
- Should be done one day before the release to ensure the SimRel aggregation does not contain the RC I-build repo, which is deleted on release day.
37+
- [ ] Submit the pending PRs to update build scripts to ${STREAM} GA on master and the ${STREAM}-maintenance
38+
- Should be done one day before the release
39+
- [ ] Delete the old [`I-build-${STREAM}`](https://ci.eclipse.org/releng/job/Builds/) job and its associated [Test jobs](https://ci.eclipse.org/releng/job/AutomatedTests/).
4040
"
4141

4242
echo "Creating Issue $TITLE"

scripts/newReleasePrep.sh

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)