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