]> gerrit.simantics Code Review - simantics/platform.git/blob - releng/doc/release.md
Include simantics/3d and gold-members/proteus in release train
[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://www.simantics.org:8088/r/gitweb?p=simantics/third-party.git;a=summary)\r
33 * The Simantics Platform - [simantics/platform.git](https://www.simantics.org:8088/r/gitweb?p=simantics/platform.git;a=summary)\r
34
35 Plug-in components that are part of the release train:
36 * Simupedia - [members/simupedia.git](https://www.simantics.org:8088/r/gitweb?p=members/simupedia.git;a=summary)
37 * FMIL - [simantics/fmil.git](https://www.simantics.org:8088/r/gitweb?p=simantics/fmil.git;a=summary)
38 * FMI Studio - [members/fmi.git](https://www.simantics.org:8088/r/gitweb?p=members/fmi.git;a=summary)
39 * Interoperability components - [simantics/interop.git](https://www.simantics.org:8088/r/gitweb?p=simantics/interop.git;a=summary)
40 * Simantics R binding - [simantics/r.git](https://www.simantics.org:8088/r/gitweb?p=simantics/r.git;a=summary)
41 * Matlab SCL binding - [simantics/matlab.git](https://www.simantics.org:8088/r/gitweb?p=simantics/matlab.git;a=summary)
42 * Python SCL binding - [simantics/python.git](https://www.simantics.org:8088/r/gitweb?p=simantics/python.git;a=summary)
43 * Simantics System Dynamics - [simantics/sysdyn.git](https://www.simantics.org:8088/r/gitweb?p=simantics/sysdyn.git;a=summary)
44 * Simantics District modelling components - [simantics/district.git](https://www.simantics.org:8088/r/gitweb?p=simantics/district.git;a=summary)
45 * Simantics 3D modelling components - [simantics/3d.git](https://www.simantics.org:8088/r/gitweb?p=simantics/3d.git;a=summary)
46 * Simantics Proteus toolset - [gold-members/proteus.git](https://www.simantics.org:8088/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 branch from selected commit
68
69 When release stabilisation starts, branch all relevant repositories like this:
70
71     git clone ssh://<user>@www.simantics.org:29418/simantics/platform.git
72     cd platform
73     git branch release/x.y.z[.w] <commit>
74     git push origin release/x.y.z[.w]
75
76 When creating major/minor releases `<commit>` is usually a commit in the `master` branch.
77 With service releases, branch from an existing `release/*` branch instead.
78
79 Use of the included `release-helper.sh` shell script is highly encouraged 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:
80
81     Usage: release-helper.sh <version> <branch-name> <user-name> clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag
82
83 First, begin by cloning all the repositories:
84
85     ./release-helper.sh x.y.z release/x.y.z your-git-username clone
86
87 This will create a directory called `x.y.z` under the current working directory and clone all the repositories under it.
88
89 Branching and pushing the branches to remote happens as follows:
90
91     ./release-helper.sh x.y.z release/x.y.z your-git-username branch
92     ./release-helper.sh x.y.z release/x.y.z your-git-username push
93
94 ## Prepare release branch for use
95
96 In release 1.31.0 Simantics started using uses 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.
97
98 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.
99
100 ### Prepare `.tpd` files
101
102 1. Retrieve release branch of the platform repository
103
104        git clone ssh://<user>@www.simantics.org:29418/simantics/platform.git
105        cd platform
106        git branch release/x.y.z[.w] remotes/origin/release/x.y.z[.w]
107        git checkout release/x.y.z[.w]
108
109 2. Edit all target platform files in `releng/org.simantics.sdk.build.targetdefinition/`, i.e.
110    * `org.simantics.sdk.build.targetdefinition.tpd`
111    * `simantics.tpd`
112
113    Replace the following rows in both mentioned files:
114
115    ~~~
116    location "http://www.simantics.org/download/master/external-components/maven" {
117    location "http://www.simantics.org/download/master/external-components/manual" {
118    include "http://www.simantics.org/download/master/org.simantics.sdk.build.targetdefinition.tpd"
119    location "http://www.simantics.org/download/master/sdk" {
120    ~~~
121
122    with
123
124    ~~~
125    location "http://www.simantics.org/download/release/x.y.z[.w]/maven" {
126    location "http://www.simantics.org/download/release/x.y.z[.w]/manual" {
127    include "http://www.simantics.org/download/release/x.y.z[.w]/org.simantics.sdk.build.targetdefinition.tpd"
128    location "http://www.simantics.org/download/release/x.y.z[.w]/sdk" {
129    ~~~
130
131 3. Edit version number of `org.simantics.sdk` feature in `features/org.simantics.sdk.feature/feature.xml` to `x.y.z[.w]`.
132    ~~~
133    <feature
134          id="org.simantics.sdk"
135          label="Simantics SDK"
136          version="x.y.z"
137          provider-name="VTT Technical Research Centre of Finland">
138    ~~~
139
140    An example of these changes can be seen in [gitweb](https://www.simantics.org:8088/r/gitweb?p=simantics%2Fplatform.git;a=commit;h=5271b0faa98303225d00e6cd838d3fc52488545c) or [review 1361](https://www.simantics.org:8088/r/#/c/1361/).
141
142 4. Ensure that Redmine has a release engineering issue for the branched release, such as [Simantics 1.30.0 release engineering](https://www.simantics.org/redmine/issues/7263). Make a copy of the previous release issue to create the new one. Include link to original issue while copying.
143
144 5. Commit the changes made
145
146         git commit -a
147
148    with the commit message
149
150         Configured release/x.y.z[.w] branch for SDK builds.
151
152         refs #xxxx
153
154    where `#xxxx` is the number of the x.y.z[.w] release engineering issue and push them to remote
155
156         git push origin release/x.y.z[.w]
157
158 6. If you are branching from `master`, bump the revision of master right now to start the next release cycle in master.
159    An example of these changes can be seen in [gitweb](https://www.simantics.org:8088/r/gitweb?p=simantics%2Fplatform.git;a=commit;h=564ac84a2949b19ce5c1c7c838b575527ec42b09) or in [review 1362](https://www.simantics.org:8088/r/#/c/1362). The changes include:
160    * Simantics Desktop splash screen update (version number)
161    * Simantics target platform name to state correct development version
162    * org.simantics.sdk feature version bump
163    * org.simantics.sdk.repository project version bump 
164
165    Commit the changes with the following commit message
166
167        Bumped master target and org.simantics.sdk feature versions to x.y.z[.w].
168
169        refs #yyyy
170
171    where `#yyyy` is the number of the next release's release engineering issue.
172
173 ### Initialize release branch distribution web site
174
175 * Run [SDK/Deploy External Components to Web](https://www.simantics.org/jenkins/job/SDK/job/Deploy%20External%20Components%20to%20Web/) build with parameters:
176   * **GERRIT_REFNAME:** `release/x.y.z[.w]`
177   * **PUBLISH_ARTIFACTS:** `true`
178 * Run the [SDK/Simantics SDK](https://www.simantics.org/jenkins/job/SDK/job/Simantics%20SDK/) build with parameters:
179   * **GERRIT_REFNAME:** `release/x.y.z[.w]`
180   * **PUBLISH_ARTIFACTS:** `true`
181
182 Running these two builds will ensure that both the external components required to build the SDK and the Simantics SDK for the new release branch are published online at `http://www.simantics.org/download/release/x.y.z[.w]/`.
183
184 After this, whenever changes are pushed/merged to `release/x.y.z[.w]` branch in Gerrit, new **SDK/Simantics SDK** builds are triggered automatically and they will publish the results at the same location online.
185
186 This means that one does not have to do any tricks after this to build and publish the SDK as a P2 repository online. It is an automated process that is performed by the [SDK/Simantics SDK](https://www.simantics.org/jenkins/job/SDK/job/Simantics%20SDK/) Jenkins job.
187
188 ### Update release-branch `.target` files
189
190 Next, we want to change the `.tpd` and `.target` files to point to the correct P2 repository locations in the release-branch. This happens by opening the previously edited `.tpd` files in Obeo's editor and regenerating the `.target` files by pressing Alt+R.
191
192 Push the changed files to remote again with commit message:
193
194     Configured release/x.y.z[.w] branch .target files.
195
196     refs #xxxx
197
198 See [review 1361](https://www.simantics.org:8088/r/#/c/1361) for an example.
199
200 ### Test Release Train build
201
202 Trigger an execution of the [simantics-release-train](https://www.simantics.org/jenkins/job/simantics-release-train/) Jenkins job with parameters
203 * GERRIT_REFNAME: `release/x.y.z[.w]`\r
204 * PUBLISH_ARTIFACTS: `true`\r
205
206 to ensure that all components of the release train build fine and to publish first versions of P2 repositories of everything online.
207
208 ## Review documentation
209
210 Documentation to review:
211 * [Developer wiki](http://dev.simantics.org/)
212 * [End-user wiki](https://www.simantics.org/end_user_wiki)
213 * [Member wiki](https://www.simantics.org/members)
214
215 For each wiki page:
216 * Read through and get authors to fix found problems, such as TODOs or invalid information.
217
218 ## Review tutorials
219
220 * Ensure tutorial wiki documentation at http://dev.simantics.org/index.php/Tutorials is up-to-date with the released platform
221 * Ensure tutorial projects and product build properly
222
223 * com.acme.movie
224   - Build with Buckminster, com.acme.movie.product.site.feature
225
226 ## Tag release/* branches
227
228 When the release branches are ready for the release, tag them with the tag `vx.y.z[.w]`:
229
230     git clone ssh://<user>@www.simantics.org:29418/simantics/platform.git
231     cd platform
232     git checkout release/x.y.z[.w]
233     git tag vx.y.z[.w] -m "Simantics x.y.z[.w] simultaneous release"
234     git push origin --tags
235
236     git clone ssh://<user>@www.simantics.org:29418/simantics/third-party.git
237     cd third-party
238     git checkout release/x.y.z[.w]
239     git tag vx.y.z[.w] -m "Simantics x.y.z[.w] simultaneous release"
240     git push origin --tags
241
242 > Note The -m argument must be supplied to create an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging).
243 > Only annotated or signed tags can be pushed to Gerrit.
244
245 ## Backup documentation wiki databases
246
247 **NOTE: This step is now deprecated since we are in the process of moving all mediawiki-based documentation into the platform git repository.** 
248
249 This step is only necessary for major/minor releases, not for service releases.
250
251 The wiki databases to be backed up are:
252 * [Developer wiki](http://dev.simantics.org/)
253 * [End-user wiki](https://www.simantics.org/end_user_wiki)
254
255 These are MediaWiki installations. The only sane way to "tag" the documentation
256 is to back up the mysql database backing the wiki. Should the wiki be required
257 at a later time for some reason, we'll put the documentation up then in a
258 separate Mediawiki installation.
259
260 1. Dump documentation wiki databases using [dump-wikis.sh](./dump-wikis.sh) script.
261 2. Put the generated backup x.y.z.tar.gz at /var/backup/simantics-releases/x.y.z/wiki/
262
263 ## Compile change log entry
264
265 * 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].
266 * 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)
267 * Open the new link in another browser/tab to start editing the new wiki page
268 * Edit the previous release's page and copy its wiki source contents over to the new release's page.
269 * Fix the content to match the new release:
270   * Remove the issue content of the previous release
271   * Fix release number, release date, release branch link and the link to all issues closed for the release
272     * 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)
273   * Add filter to query: **Release Notes: Any** to only show issues that have some content in their Release Notes field
274   * Export closed issue list as CSV with selected columns only. Open the resulting CSV file in Excel.
275   * Use **Data -> Text to Columns** with tab column separation to columnize the result
276   * Format the list as a table so that there is only one issue / row
277   * Remove all other columns besides: Issue #, Tracker, Release Notes
278   * Format the data into a Textile table:
279     * Copy to table contents as text into [PSPad](http://www.pspad.com/)
280     * Replace (CTRL+H) tabs (`\t`) with `|` with `Regular Expressions` selection checked
281     * Use **Insert Text Into Lines..** (ALT-I) to fix line beginnings and ends:
282       * Text:
283         * At Lines Begin: `|#`
284         * At Lines End: `|`
285   * Copy the resulting textile table over to the change log page
286 * Highlight major issues in the list by changing the text background color of the **Type** column:
287   * `%{background: lightsalmon}Major Bug%`
288   * `%{background: lightgreen}Major Feature%`
289   * `%{background: lightgreen}Major Enhancement%`
290
291 ## Disseminate information about the release
292
293 * [Developer Wiki](http://dev.simantics.org): Update roadmap at [http://dev.simantics.org/index.php/Roadmap](http://dev.simantics.org/index.php/Roadmap)
294 * [Redmine](https://www.simantics.org/redmine/): Post news on the developer/user-visible changes here
295 * [simantics.org](https://www.simantics.org): Post news on the release and a link to the redmine post
296 * [Members Wiki](https://www.simantics.org/members/): Update frame plan to reflect the realized dates and link to Redmine news
297 * [mailto:simantics-developers@simantics.org](mailto:simantics-developers@simantics.org) Send "newsletter" to `simantics-developers@simantics.org:
298
299 **Newsletter template:**
300 ~~~
301 Hello everyone,
302
303 Simantics release x.y.z[.w] has been released. Head over to
304 https://www.simantics.org/redmine/news/<news number>
305 for the release news.
306
307 Best regards,
308 Simantics Release Engineering Team
309 ~~~
310
311 **Redmine news template:**
312 ~~~
313 Title: Simantics x.y.z[.w] released
314
315 Simantics x.y.z[.w] was released on <date>.
316 Please find change log at: [[simantics-platform:Simantics_xyzw|Simantics x.y.z[.w]]]
317
318 Insert some general thoughts on the release...
319 ~~~
320
321 ----
322
323 # TODO
324
325 * 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