Notes, rules and recipes related to Sirius release engineering.
Promoting a Milestone or Release
The jobs on our HIPP only publish "nightly" builds (using the script in
releng/org.eclipse.sirius.releng/publish-nightly.sh), which end up in
/home/data/httpd/download.eclipse.org/sirius/updates/nightly under names like
1.0.0-N20140605-075527. Promotion of such a build as a milestone is currently a manual (but simple) process:
- Login on
build.eclipse.orgusing your Eclipse commiter credentials:
- Go into the root folder for Sirius update sites:
- Copy the whole update-site you want to promote from
milestones, under the final name. For example:
cp -a nightly/3.0.0-N20150503-075527 milestones/3.0.0M7
- Also copy the archived version of the update-sites. To reduce disk usage a little, these archives are not promoted for each nightly individually, but only for the the latest build of a given stream. For example for Sirius 3.0.x, the zip files are located in
nightly/3.0.x, so promoting the zipped versions is done by (for example)
cp nightly/3.0.x/org.eclipse.sirius*.zip milestones/3.0.0M7. WARNING: Because only one version of the archived update sites is kept per stream, the zip files are overwritten on each nightly build for that stream. Only copy the existing archives if you are 100% sure they correspond to the exact build you are promoting. Otherwise re-create them manually from the actual promoted repositories:
cd milestones/3.0.0M7 # Repeat from here for each platform-specific variant, e.g. kepler and mars cd luna # Produce org.eclipse.sirius-3.0.0M7-luna.zip zip -r ../org.eclipse.sirius-$(basename $(dirname $(pwd)))-$(basename $(pwd)).zip artifacts.jar content.jar features/ plugins/ cd tests # Produce org.eclipse.sirius.tests-3.0.0M7-luna.zip zip -r ../../org.eclipse.sirius.tests-$(basename $(dirname $(pwd)))-$(basename $(pwd)).zip artifacts.jar content.jar features/ plugins/
- For Stable snapshots, Milestones and Release Candidates, rename the zip files containing the archived repositories with the proper qualifier. The zip files should have names of the form
- For actual releases (and optionaly for milestones), copy and adapt the
index.htmlfile from another release to the root of the milestone/release so that users who go to e.g.
http://download.eclipse.org/sirius/updates/releases/1.0.0/instead of the platform-specific repo URL (
var version = "3.0.0rc1";for example) get pointers to the URLs they are looking for instead of a "Not Found" error message.
- WARNING: For versions following the release train, the current platform must be deleted and replaced by staging (for zip files and for update site folders).
- Update the list of available update sites on the wiki to mention the where the
milestoneswill be published.
Promoting a release follows the same principles, except that it goes from
releases. Nothing should be promoted as a final release that has not been promoted first as a milestone (preferably with a "release candidate" status), and thouroughly tested.
Also remember that this recipe only deals with the "copying the bytes" parts of the process: an actual release involves much more than that!
Cutting a maintenance branch
There are several steps needed to create a new maintenance branch for a release. Assuming
master is at version 1.0.0, which is released, and that the next version will be 2.0.0, we must:
- Create a new Git branch named
v1.0.x, starting from the exact commit containing the final released 1.0.0 version:
git branch v1.0.0x v1.0.0(assuming the tag for
v1.0.0has been created).
- In the new
v1.0.x, bump the version number to 1.0.1 to be ready for the next service release on that branch.
- On the Sirius HIPP, create a new job named
sirius-1.0.x, starting from a copy of
sirius-master. Adjust the job description and the name of the branch to build. Normally that is all that is needed, the publication script knows were to publish the build if the version bump was done correctly.
- On the
masterbranch, bump the version number to the next planned version, e.g. 2.0.0.
- Update the list of available update sites on the wiki to mention the where the nightlies for the maintenance branch will be published.
- Announce the new branch and update-site on the
To bump the Sirius version, for example from 2.0.0 to 2.0.1, most of the changes required can be performed automatically. From a clean state, first issue the following commands:
mvn org.eclipse.tycho:tycho-versions-plugin:0.21.0:set-version -DnewVersion=2.0.1-SNAPSHOT mvn -f packaging/org.eclipse.sirius.parent/pom.xml org.eclipse.tycho:tycho-versions-plugin:0.21.0:set-version -DnewVersion=2.0.1-SNAPSHOT
These use the Tycho
set-version goal to update the versions in all
MANIFEST.MF, the version of all exported packages is udpated, but not the
Import-Package clauses (which is normal).
The Tycho plug-in does not handle everything, so after that you need to manually update the coordinates of the Target Platform artifact as referenced in
Next, manually edit the version number of the parent POM for
packaging/org.eclipse.sirius.tests.parent/pom.xml, and issue:
mvn -f packaging/org.eclipse.sirius.tests.parent/pom.xml org.eclipse.tycho:tycho-versions-plugin:0.21.0:set-version -DnewVersion=2.0.1-SNAPSHOT
This takes care of the test plug-ins and feature, which are not part of the "main" build.
The version number also appears in
about.ini files, which are not handled by Tycho. The following command takes care of them:
git ls-files '**/about.ini' | while read f; do sed -i -e 's/Version 2\.0\.0/Version 2.0.1/g' $f; done
You can then perform a full build, which should be successful:
and check that all plug-ins and features (except some tests and samples) have the correct version:
find . -path '*/target/repository/**/*.jar' | grep -v '2\.0\.1'
See if any reference was forgotten with
git grep -l "2\.0\.0"
It is normal to have references to the old version in
@since annotations in the Java code, in the metamodels nsURIs, and in the release notes.
Once you are confident in the result, commit (and then push) using a message of this form:
git commit -s -m "[version] Bump version to 2.0.1"