]> gerrit.simantics Code Review - simantics/platform.git/blob - releng/doc/release.md
Bumped master version to 1.38.0
[simantics/platform.git] / releng / doc / release.md
1 # Definition of Done for Simantics Platform Releases
2
3 1. All Git repositories that are part of the Simantics release train have a branch called `release/x.y.z[.w]` and tag called `x.y.z[.w]`.
4 2. [A change log entry](https://www.simantics.org/redmine/projects/simantics-platform/wiki/ChangeLog) is compiled from the issues in this release and made available to the general public separately for the platform and for the open products included in the release train.
5 3. [Roadmap](http://dev.simantics.org/index.php/Roadmap) is up-to-date.
6 4. [Tutorials](http://dev.simantics.org/index.php/Tutorials) are up-to-date and coherent with the platform.
7 5. For all new major/minor releases, Wiki documentation is backed up (cloned).
8
9 ----
10
11 # Simantics Platform Release Process
12
13 * Create `release/x.y.z[.w]` release stabilisation branch
14 * Repeat until stable:
15   * Develop, test and document components and test products
16 * Tag the release in repository
17 * Backup documentation wiki databases
18 * Build and publish SDK package with and without sources
19   * Does not really require any work
20 * Build Simantics open source products and plug-in components which are a part of the release train
21 * Update websites to reflect the new release
22
23 ----
24
25 # Released Plug-in Components and Products
26
27 There are both plug-in components and products that are part of the _Simantics Release Train_ that shall be released simultaneously to a major or minor Simantics release.
28
29 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.
30
31 Core components of the release train:
32 * 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)
33 * The Simantics Platform - [simantics/platform.git](https://gerrit.simantics.org/r/gitweb?p=simantics/platform.git;a=summary)
34
35 Plug-in components that are part of the release train:
36 * Simupedia - [members/simupedia.git](https://gerrit.simantics.org/r/gitweb?p=members/simupedia.git;a=summary)
37 * FMIL - [simantics/fmil.git](https://gerrit.simantics.org/r/gitweb?p=simantics/fmil.git;a=summary)
38 * FMI Studio - [members/fmi.git](https://gerrit.simantics.org/r/gitweb?p=members/fmi.git;a=summary)
39 * Interoperability components - [simantics/interop.git](https://gerrit.simantics.org/r/gitweb?p=simantics/interop.git;a=summary)
40 * Simantics R binding - [simantics/r.git](https://gerrit.simantics.org/r/gitweb?p=simantics/r.git;a=summary)
41 * Matlab SCL binding - [simantics/matlab.git](https://gerrit.simantics.org/r/gitweb?p=simantics/matlab.git;a=summary)
42 * Python SCL binding - [simantics/python.git](https://gerrit.simantics.org/r/gitweb?p=simantics/python.git;a=summary)
43 * Simantics System Dynamics - [simantics/sysdyn.git](https://gerrit.simantics.org/r/gitweb?p=simantics/sysdyn.git;a=summary)
44 * Simantics District modelling components - [simantics/district.git](https://gerrit.simantics.org/r/gitweb?p=simantics/district.git;a=summary)
45 * Simantics 3D modelling components - [simantics/3d.git](https://gerrit.simantics.org/r/gitweb?p=simantics/3d.git;a=summary)
46 * Simantics Proteus toolset - [gold-members/proteus.git](https://gerrit.simantics.org/r/gitweb?p=gold-members/proteus.git;a=summary)
47
48 Products that are part of the release train:
49 * Simantics Desktop
50 * Simantics System Dynamics Tool
51   * This is Simantics Desktop with Simantics System Dynamics Tool features installed
52
53 For simplicity, each of these components are versioned accoring to platform versioning, i.e. for Platform SDK 1.26.0 there will be Simantics Desktop 1.26.0, Sysdyn 1.26.0, and so on.
54
55 ----
56
57 # Release Schedule
58
59 * Releases are branched 4 weeks before the set release date.
60 * During this time no more new features are allowed in the release branch and the existing work shall be stabilized. Work must be focused on bug fixes and documentation.
61 * Source code changes to release branches are forbidden in the last 2 weeks. Documentation-only changes are still allowed. However, if critical show-stopper problems surface during that time, the changes must be done. After that the release engineering team must decide whether to stick to the original release schedule or whether to delay the release.   
62
63 ----
64
65 # Simantics Platform Release - Step by Step
66
67 ## Create release engineering issue(s) in Gitlab
68
69 Ensure that Gitlab has a release engineering issue for the branched release,
70 such as [Simantics 1.34.0 release engineering](https://gitlab.simantics.org/simantics/platform/issues/16)
71 * Make a new release issue with title `$version release engineering`.
72 * Add a link to the previous previous release's issue in the new issue description, e.g. `simantics/platform#16`.
73 * Add labels `releng` and `$version` to the new issue
74
75 ## Create release branch from selected commit
76
77 When release stabilisation starts, all relevant repositories need to be branched.
78 When creating major/minor releases `<commit>` is usually a commit in the `master` branch.
79 With service releases, branch from an existing `release/*` branch instead.
80
81 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.
82 The script supports many useful basic git commands which all perform the requested operation on all the release train repositories.
83 The operations can be seen from the help text printed by the script when given no arguments:
84
85 ```
86 Usage: release-helper.sh <version> <branch-name> <user-name> <command> [<command-arguments>]
87
88 Commands:
89     clone                The first thing that needs to be done before anything else
90                          Clones all platform repositories under directory <version>
91
92 Inspection commands:
93     diff [args]          Run git diff [args] for each platform repository
94     log [args]           Run git log [args] for each platform repository
95     status [args]        Run git status [args] for each platform repository
96     list-tags            Run git tag -l for each repository
97
98 Action:
99     add
100     branch               Run git branch <branch-name> for each platform repository
101     checkout             Run git checkout <branch-name> for each repository
102     commit
103     fetch                Run git fetch --all for each repository
104     pull                 Run git pull --all for each repository
105     push                 Run git push origin <branch> for each repository
106     push-tags            Run git push --tags for each repository
107     remove-tag           Run git tag -d v<branch> for each repository
108     reset [args]         Run git reset [args] for each repository
109     tag                  Run git checkout <branch> and
110                          git tag -a v<branch> -m "Simantics <branch> simultaneous release"
111                          for each repository
112
113 Compound release commands:
114     prepare-release-branch <from-branch>
115         <from-branch>    the name of the branch that the codebase is currently on
116
117 Top-level release commands:
118     bump-master-version <from-version> <to-version>
119         <from-version>   the version string to replace
120         <to-version>     the replacing new version string
121
122     branch-release <from-branch>
123         <from-branch>    the branch to create the service branch from
124                          e.g. master or release/x.y.z
125 ```
126
127 Begin by cloning all the repositories for working on 
128
129     user=<your-git-username>
130     version=x.y.z
131     branch=release/x.y.z
132     ./release-helper.sh $version $branch $user clone
133
134 This will create a directory called `x.y.z` under the current working directory and clone all the repositories under it.
135 The first `version` argument is only used for the base working directory `x.y.z`.
136 The second `branch` argument tells what branch to specify to some of the available actions, e.g. `branch`, `checkout`, etc.
137
138 Creating the release branch from master and pushing the new branches to remote happens as follows:
139
140     # When the commit messages appear, add references to created
141     # Gitlab release engineering issues by adding this to the commit message:
142     # 
143     # gitlab #xxxx
144     #
145     # where xxxx is the release engineering issue for the respective project
146     ./release-helper.sh $version $branch $user branch-release master
147     ./release-helper.sh $version $branch $user push
148
149 If you're creating a service release `x.y.w` from `x.y.z` where `w > z`, do this:
150
151     fromBranch=release/x.y.z
152     branch=release/x.y.w
153     ./release-helper.sh $version $branch $user branch-release $fromBranch
154     ./release-helper.sh $version $branch $user push
155
156 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.
157 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).
158 The changes include:
159    * Simantics Desktop splash screen update (version number)
160    * Simantics target platform name to state correct development version
161    * org.simantics.sdk feature version bump
162    * org.simantics.sdk.repository project version bump 
163
164 Perform and push the changes *in master* by running:
165
166     branch=master
167     ./release-helper.sh $version $branch $user checkout
168     ./release-helper.sh $version $branch $user bump-master-version x.y.z X.Y.Z
169     ./release-helper.sh $version $branch $user push
170
171 where `x.y.z` is the old version number of master and `X.Y.Z` is the new version number.
172
173 ### Test Release Train build
174
175 Trigger an execution of the [simantics-release-train](https://www.simantics.org/jenkins/job/simantics-release-train/) Jenkins job with parameters
176 * GERRIT_REFNAME: `release/x.y.z[.w]`
177 * PUBLISH_ARTIFACTS: `true`
178
179 to ensure that all components of the release train build fine and to publish first versions of P2 repositories of everything online.
180
181 The release train build is currently never ran automatically. 
182 However, after following all these steps, whenever changes are pushed/merged to `release/x.y.z[.w]` branch in Gerrit, new Jenkins builds are triggered automatically and they will publish the results (P2 repositories/products) at their designated locations online.
183
184 #### [Optional reading] Release train build details
185
186 The release train build does two very important steps as the first things,
187 i.e. build the external dependency P2 repositories for both the
188 Platform SDK and Simupedia:
189 ~~~
190 stage('External Dependencies') {
191     node {
192         build job: 'SDK/Deploy External Components to Web', parameters: params1
193         build job: 'Member Components/Simupedia/fi.semantum.simupedia.build.p2.site', parameters: params1
194     }    
195 }
196 ~~~
197 After that it builds the Platform SDK and Simupedia before building anything else:
198 ~~~
199 stage('SDK') {
200     node {
201         build job: 'SDK/Simantics SDK', parameters: params1
202         // Note that Simantics SDK builds simupedia-git as well
203     }
204 }
205 ~~~
206
207 ## Review documentation
208
209 Documentation to review:
210 * [Developer wiki](http://dev.simantics.org/)
211 * [End-user wiki](https://www.simantics.org/end_user_wiki)
212 * [Member wiki](https://www.simantics.org/members)
213
214 For each wiki page:
215 * Read through and get authors to fix found problems, such as TODOs or invalid information.
216
217 ## Review tutorials
218
219 * Ensure tutorial wiki documentation at http://dev.simantics.org/index.php/Tutorials is up-to-date with the released platform
220 * Ensure tutorial projects and product build properly
221
222 * com.acme.movie
223   - Build with Buckminster, com.acme.movie.product.site.feature
224
225 ## Tag release/* branches
226
227 When the release branches are ready for the release, tag them with the tag `vx.y.z[.w]`:
228
229     ./release-helper.sh x.y.z release/x.y.z your-git-username checkout
230     ./release-helper.sh x.y.z release/x.y.z your-git-username pull
231     ./release-helper.sh x.y.z release/x.y.z your-git-username tag
232     ./release-helper.sh x.y.z release/x.y.z your-git-username push-tags
233
234 > Note: release-helper.sh will supply the -m argument to git tag to create an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging).
235 > Only annotated or signed tags can be pushed to Gerrit.
236
237 ## Backup documentation wiki databases
238
239 **NOTE: This step is now deprecated since we are in the process of moving all mediawiki-based documentation into the platform git repository.** 
240
241 This step is only necessary for major/minor releases, not for service releases.
242
243 The wiki databases to be backed up are:
244 * [Developer wiki](http://dev.simantics.org/)
245 * [End-user wiki](https://www.simantics.org/end_user_wiki)
246
247 These are MediaWiki installations. The only sane way to "tag" the documentation
248 is to back up the mysql database backing the wiki. Should the wiki be required
249 at a later time for some reason, we'll put the documentation up then in a
250 separate Mediawiki installation.
251
252 1. Dump documentation wiki databases using [dump-wikis.sh](./dump-wikis.sh) script.
253 2. Put the generated backup x.y.z.tar.gz at /var/backup/simantics-releases/x.y.z/wiki/
254
255 ## Compile change log entry
256
257 * Edit the [main page](https://www.simantics.org/redmine/projects/simantics-platform/wiki/ChangeLog) and add a a link for release x.y.z[.w].
258 * Open the change log page of the previous release, e.g. [1.25.0](https://www.simantics.org/redmine/projects/simantics-platform/wiki/Simantics_1250)
259 * Open the new link in another browser/tab to start editing the new wiki page
260 * Edit the previous release's page and copy its wiki source contents over to the new release's page.
261 * Fix the content to match the new release:
262   * Remove the issue content of the previous release
263   * Fix release number, release date, release branch link and the link to all issues closed for the release
264     * Save new public issue query that lists all issues closed for the release by [starting from the previous release's query](https://www.simantics.org/redmine/projects/simantics-platform/issues?query_id=122)
265   * Add filter to query: **Release Notes: Any** to only show issues that have some content in their Release Notes field
266   * Export closed issue list as CSV with selected columns only. Open the resulting CSV file in Excel.
267   * Use **Data -> Text to Columns** with tab column separation to columnize the result
268   * Format the list as a table so that there is only one issue / row
269   * Remove all other columns besides: Issue #, Tracker, Release Notes
270   * Format the data into a Textile table:
271     * Copy to table contents as text into [PSPad](http://www.pspad.com/)
272     * Replace (CTRL+H) tabs (`\t`) with `|` with `Regular Expressions` selection checked
273     * Use **Insert Text Into Lines..** (ALT-I) to fix line beginnings and ends:
274       * Text:
275         * At Lines Begin: `|#`
276         * At Lines End: `|`
277   * Copy the resulting textile table over to the change log page
278 * Highlight major issues in the list by changing the text background color of the **Type** column:
279   * `%{background: lightsalmon}Major Bug%`
280   * `%{background: lightgreen}Major Feature%`
281   * `%{background: lightgreen}Major Enhancement%`
282
283 ## Disseminate information about the release
284
285 * [Developer Wiki](http://dev.simantics.org): Update roadmap at [http://dev.simantics.org/index.php/Roadmap](http://dev.simantics.org/index.php/Roadmap)
286 * [Redmine](https://www.simantics.org/redmine/): Post news on the developer/user-visible changes here
287 * [simantics.org](https://www.simantics.org): Post news on the release and a link to the redmine post
288 * [Members Wiki](https://www.simantics.org/members/): Update frame plan to reflect the realized dates and link to Redmine news
289 * [mailto:simantics-developers@simantics.org](mailto:simantics-developers@simantics.org) Send "newsletter" to `simantics-developers@simantics.org:
290
291 **Newsletter template:**
292 ~~~
293 Hello everyone,
294
295 Simantics release x.y.z[.w] has been released. Head over to
296 https://www.simantics.org/redmine/news/<news number>
297 for the release news.
298
299 Best regards,
300 Simantics Release Engineering Team
301 ~~~
302
303 **Redmine news template:**
304 ~~~
305 Title: Simantics x.y.z[.w] released
306
307 Simantics x.y.z[.w] was released on <date>.
308 Please find change log at: [[simantics-platform:Simantics_xyzw|Simantics x.y.z[.w]]]
309
310 Insert some general thoughts on the release...
311 ~~~
312
313 ----
314
315 # TODO
316
317 * Incorporate tutorial code in the platform repository as a separate folder to allow platform builds to directly ensure that the tutorial code still builds OK