Skip to content

Lyo Release Process

Jad El-khoury edited this page May 10, 2022 · 41 revisions

The plan is to make two releases: one candidate and one final. Suggested version qualifiers are suggested below (Maven version sort reference):

Stage SDK version Designer version
devel 4.0.0-SNAPSHOT 4.0.0.qualifier
alpha/beta 4.0.0.alpha 4.0.0.alpha
candidate 4.0.0.CR 4.0.0.CR
final (release) 4.0.0 4.0.0.Final
devel-next 4.1.0-SNAPSHOT 4.1.0.qualifier

NB! Make sure to always to a Git revert after you made a candidate (or alpha/beta/milestone) release. This avoids double deploy of non-SNAPSHOT artifacts that can break the Jenkins build.

Admin & overall process

  1. Check the handbook and determine the next available Wednesday slot (should conclude on the 1st or 3rd Wed of the month) for the release.
  2. When making a RC, create a release. Paste the CHANGELOG into he Description under the Basic tab; select Type A diligence.
  3. (skip until 2022-12-01) Request release review by sending an email to the EMO (use a "Schedule a review for this release" link to create an email from template!). Will land at EMO and they will create a Gitlab ticket.
  4. (skip until 2022-12-01) Generate IP Log. Will land at EMO/IP and an IPZilla ticket will be created automatically.
  5. (skip until 2022-12-01) Request a release approval from the PMC once you have a Gitlab link and (preferable, but not strictly necessary) an approval of the IP log. It's just an email, and having the links to the release entry, Gitlab and IPzilla tickets should be enough.
  6. Make a Beta release while you wait 2 weeks. Email lyo-dev.
  7. Make a candidate CR release after you get a GO decision for the release.
  8. Test and email CR info to lyo-dev and wait 24h. Also test that the refimpl works with the CR.
  9. When ready to make the final release, edit and update the release note if necessary (for example, to update the release date).
  10. Make a final release (See steps below)
  11. Announce on lyo-dev, oslc-op, and the OSLC Forum.

Part 1: SDK libraries to Maven Central

Minor releases on Eclipse require release review. Make sure to schedule one ASAP, they only take place twice a month.

Phase 1a: New version, Git push, and Eclise Maven release deploy

  1. Make sure you are on master and the repo is clean and pulled.
  2. mvn versions:set -DnewVersion=4.1.0.xx
  3. If the release is a Final one, edit the CHANGELOG.md and replace [Unreleased] with [#.#.#]
  4. Push to a new branch and create a PR. Get at least one approval if the release is Final.
  5. We need to wait for the build to succeed on Eclipse Lyo Jenkins.
  6. Tag the release
    1. git tag v4.1.0.xx
    2. git push --tags
  7. Create a draft release note (draft pre-release if you are releasing a candidate) under https://github.com/eclipse/lyo/releases. Add a CHANGELOG link in the description (make sure to point to the tagged revision, not to master):

Phase 1b: Testing on OSLC RefImpl

Note: this a test of the SDK and not the Designer. We are not re-generating the OSLC Server code using the Designer Generator at this stage.

NB! Make sure to test without having any entries for the lyo-releases repository in the POM files. Also, it is recommended to run rm -rf ~/.m2/repository/org/eclipse/lyo to be 100% sure that the packages will load from Maven Central and that no modules like parent are forgotten.

Steps:

  1. In the src/pom.xml, update the version.lyo and version.lyo.oslc-ui values.
  2. Run mvn clean package inside the /src dir.
  3. Build and start 4 Docker images by running docker-compose up --build from the /src dir.
  4. In another terminal, run java -jar client-toolchain/target/client-toolchain-0.0.1-SNAPSHOT-jar-with-dependencies.jar from the /src dir to populate servers with data.
  5. Test manually that the linking across adaptors and the Query Capability works.

Phase 1c: Promote to Maven Central (ask Andrew)

Only Andrew has the credentials to OSSRH. They don't support 2FA, so it's not optimal to share the credentials from the security PoV.

  1. Only Andrew: Log in to https://oss.sonatype.org/#welcome (legacy host, Lyo is on the "legacy" host) and go to Staging Repositories. Ask Andrew for
  2. Click Close. This may take a few minutes. See OSSRH docs for more info.
  3. Click Release (you may need to refresh first). Leave Automatically Drop option ON unless you know what you are doing (the release action is irreversible anyway).
  4. Publish the previously saved draft (pre)release note under https://github.com/eclipse/lyo/releases
  5. Keep refreshing from time to time. When the list becomes empty, the release is finished! Visit https://repo1.maven.org/maven2/org/eclipse/lyo/oslc4j/core/oslc4j-core/ to check if the artifacts were promoted to Maven Central from OSSRH already (this usually takes around 2hrs).

Phase 1d: Bring the master branch back to the SNAPSHOT state

Once you have confirmed that the release build has concluded, you can do these steps, no need to wait for the Maven Central promotion.

if you released a milestone build, revert the release comment to go back to the snapshot version:

git checkout master
git pull
git revert --no-commit HEAD
git commit -m "Continue the SNAPSHOT development"
git push

If you released a final release, use versions:set to set the next planned version with the SNAPSHOT modifier, e.g. for 4.1.0 release:

git checkout master
git pull
mvn versions:set -DnewVersion=4.2.0-SNAPSHOT
# Edit the `CHANGELOG.md` and add the `[Unreleased]` template from the bottom of the file to the top
git commit -m "Continue the SNAPSHOT development"
git push

Part 2: Lyo Designer

Note that the OSGI bundles module and the default SDK version in the model depend on the Lyo SDK version. Make sure to finalize the Lyo #.#.#.RC release before Lyo Designer #.#.#.RC and Lyo #.#.# before Lyo Designer #.#.#.RELEASE

Order of steps:

  1. Run lyo-designer-release CI step first.
  2. Run lyo-designer-promote CI step afterwards.

Links:

Stable:


You will need to run the steps below twice. First to release a candidate (eg. 4.0.0.RC), and then - if all goes well - make a final release (4.0.0.RELEASE). The same steps apply for both phases, except for the choice of version number. The final step has a variation, which is detailed below.

  1. Switch to the master branch of LyoDesigner and do a git pull.
  2. Create a new branch for the release.
  3. Run on the command line (cd to lyo.designer folder first):
    mvn -f pom.xml tycho-versions:set-version -DnewVersion='<versionNumner>' -DforceStdout -B 1. Set to, e.g., 4.0.0.RC or 4.0.0.RELEASE 2. That is, make sure to add .RELEASE to a final version. Otherwise update will not work. 3. WARNING Make sure Lyo Designer does not default to a SNAPSHOT version of Lyo SDK libs: <subModelOperations xsi:type="tool_1:SetValue" featureName="lyoVersion" valueExpression="['4.0.0'/]"/>.
  4. For the org.eclipse.lyo.oslc4j.plugins artifact
    • Manually change the Lyo version from which the plugins are to be made: <lyo.version>4.0.0</lyo.version>. important you need to make sure that this version of lyo SDK actually exists on the maven central repository. that is, Lyo should always be released before we release Lyo Designer, unless you are prepared to release older versions of Lyo as plugins.
    • Update the artifact version as well!
  5. Run the following commands in bash to verify a clean version update:
    • grep --exclude-dir=.git --exclude-dir=target --exclude-dir=bin -rE "qualifier" . 2>/dev/null
    • grep --exclude-dir=.git --exclude-dir=target --exclude-dir=bin -rE "SNAPSHOT" . 2>/dev/null
  6. Push the branch and make a pull request.
  7. Merge. This will trigger the CI build to create artefacts on edge. (might want to go to https://ci.eclipse.org/lyo/job/lyo-designer-master/ and manually start the build to make it faster)
  8. Once edge is built, run the release job https://ci.eclipse.org/lyo/job/lyo-designer-release/build?delay=0sec to copy artefacts from edge to stable THis will prompt you for the version id. Enter something like 4.0.0.RELEASE.
  9. Once stable is built, run the promote job https://ci.eclipse.org/lyo/job/lyo-designer-promote/. THis will prompt you for the version id. Enter something like 4.0.0.RELEASE.
  10. You should bring the master branch to a SNAPSHOT/qualifier state.
    1. If you just made a release candidate, (e.g., M1, RC),
      1. Do a Git revert and push this commit.
      2. make sure the plugins & binaries are all ok.
      3. Go to Step 1 above to do the final release
    2. If you did a RELEASE (i.e., a final release), bump the version number up a bit: mvn -f pom.xml tycho-versions:set-version -DnewVersion='<versionNumber>' -DforceStdout -B. Set the <versionNumber> to something such as 4.0.1-SNAPSHOT or 4.1.0-SNAPSHOT. You can push this directly to master.
      1. WARNING! Do not forget to manually change the Lyo version in org.eclipse.lyo.oslc4j.plugins from which the plugins are to be made. (same version as what was just been bumped to). <lyo.version>4.1.0-SNAPSHOT</lyo.version>
      2. The new snapshot will be built and released to "edge"
      3. You are done!

In testing, make sure that the generated Application class has the right version ID, e.g. Generated by Lyo Designer 4.1.0.RC and DOES NOT include a timestamp. Timestamp is a sign of a .qualifier version in OSGI manifests.

Clone this wiki locally