From: Tuukka Lehtonen Date: Thu, 2 Aug 2018 21:09:58 +0000 (+0300) Subject: Simplified release engineering instructions X-Git-Tag: v1.43.0~136^2~420 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=61910f888b9d1e837a4ab9dc6899da7095507319;p=simantics%2Fplatform.git Simplified release engineering instructions gitlab #71 --- diff --git a/releng/doc/release.html b/releng/doc/release.html index 222857de0..2fe58386a 100644 --- a/releng/doc/release.html +++ b/releng/doc/release.html @@ -360,84 +360,7 @@ img {

Simantics Platform Release - Step by Step

-

Create release branch from selected commit

-

When release stabilisation starts, branch all relevant repositories like this:

-
git clone ssh://<user>@gerrit.simantics.org:29418/simantics/platform.git
-cd platform
-git branch release/x.y.z[.w] <commit>
-git push origin release/x.y.z[.w]
-
-

When creating major/minor releases <commit> is usually a commit in the master branch. -With service releases, branch from an existing release/* branch instead.

-

Instead of doing this clone+branch+push sequence for every SDK repository separately, -please use the included release-helper.sh shell script to perform this mechanical work. The script supports many useful basic git commands which all perform the requested operation on all the release train repositories. The operations can be seen from the help text printed by the script when given no arguments:

-
Usage: release-helper.sh <version> <branch-name> <user-name> clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag
-
-

Always begin by cloning all the repositories for working on

-
./release-helper.sh x.y.z release/x.y.z your-git-username clone
-
-

This will create a directory called x.y.z under the current working directory and clone all the repositories under it. The first <version> argument is only used for the base working directory x.y.z. The second <branch-name> argument tells what branch to specify to the action, i.e. branch, checkout, etc.

-

Branching and pushing the branches to remote happens as follows:

-
./release-helper.sh x.y.z release/x.y.z your-git-username branch
-./release-helper.sh x.y.z release/x.y.z your-git-username checkout
-./release-helper.sh x.y.z release/x.y.z your-git-username push
-
-

If you're creating a service release x.y.w from x.y.z where w > z, do this:

-
./release-helper.sh x.y.w release/x.y.z your-git-username clone
-./release-helper.sh x.y.w release/x.y.z your-git-username checkout
-./release-helper.sh x.y.w release/x.y.w your-git-username branch
-./release-helper.sh x.y.w release/x.y.w your-git-username checkout
-# Perhaps make modifications to the branch here and commit to each project separately
-./release-helper.sh x.y.w release/x.y.w your-git-username push
-
-

Prepare release branch for use

-

In release 1.31.0 Simantics started using the wonderful tool from Obeo (https://github.com/mbarbero/fr.obeo.releng.targetplatform) to generate .target files from .tpd files which allow much simpler specification of the target contents and also composition of .tpd files via inclusion.

-

In the following steps, it is recommended to ensure every .target file is up-to-date by regenerating them from .tpd files. While doing so, take care to use up-to-date online contents to perform the generation.

-

Prepare .tpd files in platform repository

-
    -
  1. -

    Ensure you've ran

    -
    ./release-helper.sh x.y.z release/x.y.z your-git-username checkout
    -
    -

    to make sure you're working on the release branch before doing anything.

    -
  2. -
  3. -

    Go into the cloned platform repository at x.y.z/platform

    -
  4. -
  5. -

    Edit all target platform files in releng/org.simantics.sdk.build.targetdefinition/, i.e.

    -
      -
    • org.simantics.sdk.build.targetdefinition.tpd
    • -
    • simantics.tpd
    • -
    -

    Replace the following rows in both mentioned files:

    -
    location "http://www.simantics.org/download/master/external-components/maven" {
    -location "http://www.simantics.org/download/master/external-components/manual" {
    -include "http://www.simantics.org/download/master/org.simantics.sdk.build.targetdefinition.tpd"
    -location "http://www.simantics.org/download/master/sdk" {
    -
    -

    with

    -
    location "http://www.simantics.org/download/release/x.y.z[.w]/maven" {
    -location "http://www.simantics.org/download/release/x.y.z[.w]/manual" {
    -include "http://www.simantics.org/download/release/x.y.z[.w]/org.simantics.sdk.build.targetdefinition.tpd"
    -location "http://www.simantics.org/download/release/x.y.z[.w]/sdk" {
    -
    -
  6. -
  7. -

    Edit version number of org.simantics.sdk feature in features/org.simantics.sdk.feature/feature.xml to x.y.z.

    -
    <feature
    -      id="org.simantics.sdk"
    -      label="Simantics SDK"
    -      version="x.y.z"
    -      provider-name="VTT Technical Research Centre of Finland">
    -
    -

    If the release branch you're setting up is a hotfix-release x.y.z.w, -don't include the .w part in this version.

    -

    An example of these changes can be seen in -gitweb -or review 1361.

    -
  8. -
  9. +

    Create release engineering issue(s) in Gitlab

    Ensure that Gitlab has a release engineering issue for the branched release, such as Simantics 1.34.0 release engineering

    -
  10. -
-
    -
  1. -

    Commit the changes made

    -
     git commit -a
    +

    Create release branch from selected commit

    +

    When release stabilisation starts, all relevant repositories need to be branched. +When creating major/minor releases <commit> is usually a commit in the master branch. +With service releases, branch from an existing release/* branch instead.

    +

    Instead of doing this clone+branch+push sequence for every SDK repository separately, please use the included release-helper.sh shell script to perform this mechanical work. +The script supports many useful basic git commands which all perform the requested operation on all the release train repositories. +The operations can be seen from the help text printed by the script when given no arguments:

    +
    Usage: release-helper.sh <version> <branch-name> <user-name> <command> [<command-arguments>]
    +
    +Commands:
    +    clone                The first thing that needs to be done before anything else
    +                         Clones all platform repositories under directory <version>
    +
    +Inspection commands:
    +    diff [args]          Run git diff [args] for each platform repository
    +    log [args]           Run git log [args] for each platform repository
    +    status [args]        Run git status [args] for each platform repository
    +    list-tags            Run git tag -l for each repository
    +
    +Action:
    +    add
    +    branch               Run git branch <branch-name> for each platform repository
    +    checkout             Run git checkout <branch-name> for each repository
    +    commit
    +    fetch                Run git fetch --all for each repository
    +    pull                 Run git pull --all for each repository
    +    push                 Run git push origin <branch> for each repository
    +    push-tags            Run git push --tags for each repository
    +    remove-tag           Run git tag -d v<branch> for each repository
    +    reset [args]         Run git reset [args] for each repository
    +    tag                  Run git checkout <branch> and
    +                         git tag -a v<branch> -m "Simantics <branch> simultaneous release"
    +                         for each repository
    +
    +Compound release commands:
    +    prepare-release-branch <from-branch>
    +        <from-branch>    the name of the branch that the codebase is currently on
    +
    +Top-level release commands:
    +    bump-master-version <from-version> <to-version>
    +        <from-version>   the version string to replace
    +        <to-version>     the replacing new version string
    +
    +    branch-release <from-branch>
    +        <from-branch>    the branch to create the service branch from
    +                         e.g. master or release/x.y.z
     
    -

    with the commit message

    -
     Configured release/x.y.z[.w] branch for SDK builds.
    -
    - gitlab #xxxx
    +

    Begin by cloning all the repositories for working on

    +
    user=<your-git-username>
    +version=x.y.z
    +branch=release/x.y.z
    +./release-helper.sh $version $branch $user clone
     
    -

    where #xxxx is the number of the x.y.z[.w] release engineering issue and push them to remote

    -
     git push origin release/x.y.z[.w]
    +

    This will create a directory called x.y.z under the current working directory and clone all the repositories under it. +The first version argument is only used for the base working directory x.y.z. +The second branch argument tells what branch to specify to some of the available actions, e.g. branch, checkout, etc.

    +

    Creating the release branch from master and pushing the new branches to remote happens as follows:

    +
    # When the commit messages appear, add references to created
    +# Gitlab release engineering issues by adding this to the commit message:
    +# 
    +# gitlab #xxxx
    +#
    +# where xxxx is the release engineering issue for the respective project
    +./release-helper.sh $version $branch $user branch-release master
    +./release-helper.sh $version $branch $user push
     
    -
  2. -
  3. -

    If you are branching from master, bump the revision of master right now to start the next release cycle in master. -An example of these changes can be seen in gitweb or in review 1362. The changes include:

    +

    If you're creating a service release x.y.w from x.y.z where w > z, do this:

    +
    fromBranch=release/x.y.z
    +branch=release/x.y.w
    +./release-helper.sh $version $branch $user branch-release $fromBranch
    +./release-helper.sh $version $branch $user push
    +
    +

    If you branched a new release from master, you should also bump the revision of the master branch right now to start the next release cycle in master. +An example of these changes can be seen in gitweb or in review 1362. +The changes include:

    • Simantics Desktop splash screen update (version number)
    • Simantics target platform name to state correct development version
    • org.simantics.sdk feature version bump
    • org.simantics.sdk.repository project version bump
    -

    Commit the changes with the following commit message

    -
    Bumped master target and org.simantics.sdk feature versions to x.y.z[.w].
    -
    -gitlab #yyyy
    +

    Perform and push the changes by running:

    +
    ./release-helper.sh $version $branch $user bump-master-version 1.35.0 1.36.0
    +./release-helper.sh $version $branch $user push
     
    -

    where #yyyy is the number of the next release's release engineering issue.

    -
  4. -
  5. -

    Do the same for simupedia target platform files as was done in task 6. -for platform target definitions.

    -
  6. -

Test Release Train build

Trigger an execution of the simantics-release-train Jenkins job with parameters

    diff --git a/releng/doc/release.md b/releng/doc/release.md index da394696c..e3749dccf 100644 --- a/releng/doc/release.md +++ b/releng/doc/release.md @@ -29,8 +29,8 @@ There are both plug-in components and products that are part of the _Simantics R Plug-in components are installable features that are deployed online as P2 repositories for general availability. Products are deployed as ZIP files and made available online in designated locations on simantics.org. Core components of the release train: -* External third party library dependencies required by the platform - [simantics/third-party.git](https://gerrit.simantics.org/r/gitweb?p=simantics/third-party.git;a=summary) -* The Simantics Platform - [simantics/platform.git](https://gerrit.simantics.org/r/gitweb?p=simantics/platform.git;a=summary) +* External third party library dependencies required by the platform - [simantics/third-party.git](https://gerrit.simantics.org/r/gitweb?p=simantics/third-party.git;a=summary) +* The Simantics Platform - [simantics/platform.git](https://gerrit.simantics.org/r/gitweb?p=simantics/platform.git;a=summary) Plug-in components that are part of the release train: * Simupedia - [members/simupedia.git](https://gerrit.simantics.org/r/gitweb?p=members/simupedia.git;a=summary) @@ -64,136 +64,107 @@ For simplicity, each of these components are versioned accoring to platform vers # Simantics Platform Release - Step by Step -## Create release branch from selected commit +## Create release engineering issue(s) in Gitlab -When release stabilisation starts, branch all relevant repositories like this: +Ensure that Gitlab has a release engineering issue for the branched release, +such as [Simantics 1.34.0 release engineering](https://gitlab.simantics.org/simantics/platform/issues/16) +* Make a new release issue with title `$version release engineering`. +* Add a link to the previous previous release's issue in the new issue description, e.g. `simantics/platform#16`. +* Add labels `releng` and `$version` to the new issue - git clone ssh://@gerrit.simantics.org:29418/simantics/platform.git - cd platform - git branch release/x.y.z[.w] - git push origin release/x.y.z[.w] +## Create release branch from selected commit +When release stabilisation starts, all relevant repositories need to be branched. When creating major/minor releases `` is usually a commit in the `master` branch. With service releases, branch from an existing `release/*` branch instead. -Instead of doing this clone+branch+push sequence for every SDK repository separately, -please use the included `release-helper.sh` shell script to perform this mechanical work. The script supports many useful basic git commands which all perform the requested operation on all the release train repositories. The operations can be seen from the help text printed by the script when given no arguments: - - Usage: release-helper.sh clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag - -Always begin by cloning all the repositories for working on - - ./release-helper.sh x.y.z release/x.y.z your-git-username clone - -This will create a directory called `x.y.z` under the current working directory and clone all the repositories under it. The first `` argument is only used for the base working directory `x.y.z`. The second `` argument tells what branch to specify to the action, i.e. `branch`, `checkout`, etc. - -Branching and pushing the branches to remote happens as follows: - - ./release-helper.sh x.y.z release/x.y.z your-git-username branch - ./release-helper.sh x.y.z release/x.y.z your-git-username checkout - ./release-helper.sh x.y.z release/x.y.z your-git-username push +Instead of doing this clone+branch+push sequence for every SDK repository separately, please use the included `release-helper.sh` shell script to perform this mechanical work. +The script supports many useful basic git commands which all perform the requested operation on all the release train repositories. +The operations can be seen from the help text printed by the script when given no arguments: + +``` +Usage: release-helper.sh [] + +Commands: + clone The first thing that needs to be done before anything else + Clones all platform repositories under directory + +Inspection commands: + diff [args] Run git diff [args] for each platform repository + log [args] Run git log [args] for each platform repository + status [args] Run git status [args] for each platform repository + list-tags Run git tag -l for each repository + +Action: + add + branch Run git branch for each platform repository + checkout Run git checkout for each repository + commit + fetch Run git fetch --all for each repository + pull Run git pull --all for each repository + push Run git push origin for each repository + push-tags Run git push --tags for each repository + remove-tag Run git tag -d v for each repository + reset [args] Run git reset [args] for each repository + tag Run git checkout and + git tag -a v -m "Simantics simultaneous release" + for each repository + +Compound release commands: + prepare-release-branch + the name of the branch that the codebase is currently on + +Top-level release commands: + bump-master-version + the version string to replace + the replacing new version string + + branch-release + the branch to create the service branch from + e.g. master or release/x.y.z +``` + +Begin by cloning all the repositories for working on + + user= + version=x.y.z + branch=release/x.y.z + ./release-helper.sh $version $branch $user clone + +This will create a directory called `x.y.z` under the current working directory and clone all the repositories under it. +The first `version` argument is only used for the base working directory `x.y.z`. +The second `branch` argument tells what branch to specify to some of the available actions, e.g. `branch`, `checkout`, etc. + +Creating the release branch from master and pushing the new branches to remote happens as follows: + + # When the commit messages appear, add references to created + # Gitlab release engineering issues by adding this to the commit message: + # + # gitlab #xxxx + # + # where xxxx is the release engineering issue for the respective project + ./release-helper.sh $version $branch $user branch-release master + ./release-helper.sh $version $branch $user push If you're creating a service release `x.y.w` from `x.y.z` where `w > z`, do this: - ./release-helper.sh x.y.w release/x.y.z your-git-username clone - ./release-helper.sh x.y.w release/x.y.z your-git-username checkout - ./release-helper.sh x.y.w release/x.y.w your-git-username branch - ./release-helper.sh x.y.w release/x.y.w your-git-username checkout - # Perhaps make modifications to the branch here and commit to each project separately - ./release-helper.sh x.y.w release/x.y.w your-git-username push - -## Prepare release branch for use - -In release 1.31.0 Simantics started using the wonderful tool from Obeo ([https://github.com/mbarbero/fr.obeo.releng.targetplatform](https://github.com/mbarbero/fr.obeo.releng.targetplatform)) to generate `.target` files from `.tpd` files which allow much simpler specification of the target contents and also composition of .tpd files via inclusion. - -In the following steps, it is recommended to ensure every `.target` file is up-to-date by regenerating them from `.tpd` files. While doing so, take care to use up-to-date online contents to perform the generation. - -### Prepare `.tpd` files in platform repository - -0. Ensure you've ran - - ./release-helper.sh x.y.z release/x.y.z your-git-username checkout - - to make sure you're working on the release branch before doing anything. - -1. Go into the cloned platform repository at `x.y.z/platform` - -2. Edit all target platform files in `releng/org.simantics.sdk.build.targetdefinition/`, i.e. - * `org.simantics.sdk.build.targetdefinition.tpd` - * `simantics.tpd` - - Replace the following rows in both mentioned files: + fromBranch=release/x.y.z + branch=release/x.y.w + ./release-helper.sh $version $branch $user branch-release $fromBranch + ./release-helper.sh $version $branch $user push - ~~~ - location "http://www.simantics.org/download/master/external-components/maven" { - location "http://www.simantics.org/download/master/external-components/manual" { - include "http://www.simantics.org/download/master/org.simantics.sdk.build.targetdefinition.tpd" - location "http://www.simantics.org/download/master/sdk" { - ~~~ - - with - - ~~~ - location "http://www.simantics.org/download/release/x.y.z[.w]/maven" { - location "http://www.simantics.org/download/release/x.y.z[.w]/manual" { - include "http://www.simantics.org/download/release/x.y.z[.w]/org.simantics.sdk.build.targetdefinition.tpd" - location "http://www.simantics.org/download/release/x.y.z[.w]/sdk" { - ~~~ - -3. Edit version number of `org.simantics.sdk` feature in `features/org.simantics.sdk.feature/feature.xml` to `x.y.z`. - ~~~ - - ~~~ - - If the release branch you're setting up is a hotfix-release `x.y.z.w`, - don't include the `.w` part in this version. - - An example of these changes can be seen in - [gitweb](https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commit;h=5271b0faa98303225d00e6cd838d3fc52488545c) - or [review 1361](https://gerrit.simantics.org/r/#/c/1361/). - -4. Ensure that Gitlab has a release engineering issue for the branched release, - such as [Simantics 1.34.0 release engineering](https://gitlab.simantics.org/simantics/platform/issues/16) - * Make a new release issue with title `$version release engineering`. - * Add a link to the previous previous release's issue in the new issue description, e.g. `simantics/platform#16`. - * Add labels `releng` and `$version` to the new issue - - -5. Commit the changes made - - git commit -a - - with the commit message - - Configured release/x.y.z[.w] branch for SDK builds. - - gitlab #xxxx - - where `#xxxx` is the number of the x.y.z[.w] release engineering issue and push them to remote - - git push origin release/x.y.z[.w] - -6. If you are branching from `master`, bump the revision of master right now to start the next release cycle in master. - An example of these changes can be seen in [gitweb](https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commit;h=564ac84a2949b19ce5c1c7c838b575527ec42b09) or in [review 1362](https://gerrit.simantics.org/r/#/c/1362). The changes include: +If you branched a new release from `master`, you should also bump the revision of the master branch right now to start the next release cycle in master. +An example of these changes can be seen in [gitweb](https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commit;h=564ac84a2949b19ce5c1c7c838b575527ec42b09) or in [review 1362](https://gerrit.simantics.org/r/#/c/1362). +The changes include: * Simantics Desktop splash screen update (version number) * Simantics target platform name to state correct development version * org.simantics.sdk feature version bump * org.simantics.sdk.repository project version bump - Commit the changes with the following commit message - - Bumped master target and org.simantics.sdk feature versions to x.y.z[.w]. - - gitlab #yyyy - - where `#yyyy` is the number of the next release's release engineering issue. +Perform and push the changes by running: -7. Do the same for simupedia target platform files as was done in task 6. - for platform target definitions. + ./release-helper.sh $version $branch $user bump-master-version 1.35.0 1.36.0 + ./release-helper.sh $version $branch $user push ### Test Release Train build