]> gerrit.simantics Code Review - simantics/platform.git/blob - releng/doc/release.md
Fixed all line endings of the repository
[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 Products that are part of the release train: 
32 * Simantics Desktop
33 * Simantics System Dynamics Tool - [simantics/sysdyn.git](https://www.simantics.org:8088/r/gitweb?p=simantics/sysdyn.git;a=summary)
34
35 Plug-in components that are part of the release train:
36 * Simantics R - [simantics/r.git](https://www.simantics.org:8088/r/gitweb?p=simantics/r.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 * Simupedia - [Members SVN](https://www.simantics.org/svn/members/simupedia)
40
41 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.  
42
43 ----
44
45 # Release Schedule
46
47 * Releases are branched 4 weeks before the set release date.
48 * 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.
49 * 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.   
50
51 ----
52
53 # Simantics Platform Release - Step by Step
54
55 ## Create release branch from selected commit
56
57 When release stabilisation starts, branch `simantics/platform` and `simantics/third-party` repositories:
58
59     git clone ssh://<user>@www.simantics.org:29418/simantics/platform.git
60     cd platform
61     git branch release/x.y.z[.w] <commit>
62     git push origin release/x.y.z[.w]
63
64     git clone ssh://<user>@www.simantics.org:29418/simantics/third-party.git
65     cd third-party
66     git branch release/x.y.z[.w] <commit>
67     git push origin release/x.y.z[.w]
68
69 When creating major/minor releases `<commit>` is usually a commit in the `master` branch.
70 With service releases, branch from an existing `release/*` branch instead.
71
72 ## Prepare release branch for use
73
74 ### Prepare .target files
75
76 1. Retrieve release branch of the platform repository
77
78        git clone ssh://<user>@www.simantics.org:29418/simantics/platform.git
79        cd platform
80        git branch release/x.y.z[.w] remotes/origin/release/x.y.z[.w]
81        git checkout release/x.y.z[.w]
82
83 2. Edit all target platform files in  `releng/org.simantics.sdk.build.targetdefinition/`, i.e.
84    * `simantics.target`
85    * `org.simantics.sdk.build.targetdefinition.target`
86
87    At the beginning of simantics.target file, increment `sequenceNumber` by 1
88    ~~~
89    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
90    <?pde version="3.8"?>
91    <target name="Simantics x.y.z[.w]" sequenceNumber="11">
92    ~~~
93
94    Next, replace the following rows in both mentioned files:   
95
96    ~~~
97    <repository location="http://www.simantics.org/download/master/sdk"/>
98    <repository location="http://www.simantics.org/download/master/external-components/maven"/>
99    <repository location="http://www.simantics.org/download/master/external-components/manual"/>
100    ~~~
101
102    with
103
104    ~~~
105    <repository location="http://www.simantics.org/download/release/x.y.z[.w]/sdk"/>
106    <repository location="http://www.simantics.org/download/release/x.y.z[.w]/external-components/maven"/>
107    <repository location="http://www.simantics.org/download/release/x.y.z[.w]/external-components/manual"/>
108    ~~~
109
110 ### Initialize release branch distribution web site
111
112 * Run [SDK/Deploy External Components to Web](https://www.simantics.org/jenkins/job/SDK/job/Deploy%20External%20Components%20to%20Web/) build with parameters:
113   * **GERRIT_REFNAME:** `release/x.y.z[.w]`
114   * **PUBLISH_ARTIFACTS:** `true`
115 * Run the [SDK/Simantics SDK](https://www.simantics.org/jenkins/job/SDK/job/Simantics%20SDK/) build with parameters:
116   * **GERRIT_REFNAME:** `release/x.y.z[.w]`
117   * **PUBLISH_ARTIFACTS:** `true`
118
119 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]/`.
120
121 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.
122
123 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.
124
125 ## Review documentation
126
127 Documentation to review:
128 * [Developer wiki](http://dev.simantics.org/)
129 * [End-user wiki](https://www.simantics.org/end_user_wiki)
130 * [Member wiki](https://www.simantics.org/members)
131
132 For each wiki page:
133 * Read through and get authors to fix found problems, such as TODOs or invalid information.
134
135 ## Review tutorials
136
137 * Ensure tutorial wiki documentation at http://dev.simantics.org/index.php/Tutorials is up-to-date with the released platform
138 * Ensure tutorial projects and product build properly
139
140 * com.acme.movie
141   - Build with Buckminster, com.acme.movie.product.site.feature
142
143 ## Tag release/* branches
144
145 When the release branches are ready for the release, tag them with the tag `vx.y.z[.w]`:
146
147     git clone ssh://<user>@www.simantics.org:29418/simantics/platform.git
148     cd platform    
149     git checkout release/x.y.z[.w]
150     git tag vx.y.z[.w] -m "Simantics x.y.z[.w] release"
151     git push origin --tags
152
153     git clone ssh://<user>@www.simantics.org:29418/simantics/third-party.git
154     cd third-party
155     git checkout release/x.y.z[.w]
156     git tag vx.y.z[.w] -m "Simantics x.y.z[.w] release"
157     git push origin --tags
158
159 > Note The -m argument must be supplied to create an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging).
160 > Only annotated or signed tags can be pushed to Gerrit.
161
162 ## Backup documentation wiki databases 
163
164 This step is only necessary for major/minor releases, not for service releases.
165
166 The wiki databases to be backed up are:
167 * [Developer wiki](http://dev.simantics.org/)
168 * [End-user wiki](https://www.simantics.org/end_user_wiki)
169
170 These are MediaWiki installations. The only sane way to "tag" the documentation
171 is to back up the mysql database backing the wiki. Should the wiki be required
172 at a later time for some reason, we'll put the documentation up then in a
173 separate Mediawiki installation. 
174
175 1. Dump documentation wiki databases using [dump-wikis.sh](./dump-wikis.sh) script.
176 2. Put the generated backup x.y.z.tar.gz at /var/backup/simantics-releases/x.y.z/wiki/
177
178 ## Compile change log entry
179
180 * 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].
181 * 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)
182 * Open the new link in another browser/tab to start editing the new wiki page
183 * Edit the previous release's page and copy its wiki source contents over to the new release's page.
184 * Fix the content to match the new release:
185   * Remove the issue content of the previous release
186   * Fix release number, release date, release branch link and the link to all issues closed for the release
187     * 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)
188   * Add filter to query: **Release Notes: Any** to only show issues that have some content in their Release Notes field
189   * Export closed issue list as CSV with selected columns only. Open the resulting CSV file in Excel.
190   * Use **Data -> Text to Columns** with tab column separation to columnize the result
191   * Format the list as a table so that there is only one issue / row
192   * Remove all other columns besides: Issue #, Tracker, Release Notes
193   * Format the data into a Textile table:
194     * Copy to table contents as text into [PSPad](http://www.pspad.com/)
195     * Replace (CTRL+H) tabs (`\t`) with `|` with `Regular Expressions` selection checked
196     * Use **Insert Text Into Lines..** (ALT-I) to fix line beginnings and ends:
197       * Text:
198         * At Lines Begin: `|#`
199         * At Lines End: `|`
200   * Copy the resulting textile table over to the change log page
201 * Highlight major issues in the list by changing the text background color of the **Type** column:
202   * `%{background: lightsalmon}Major Bug%`
203   * `%{background: lightgreen}Major Feature%`
204   * `%{background: lightgreen}Major Enhancement%`
205
206 ## Disseminate information about the release
207
208 * [Developer Wiki](http://dev.simantics.org): Update roadmap at http://dev.simantics.org/index.php/Roadmap
209 * [Redmine](https://www.simantics.org/redmine/): Post news on the developer/user-visible changes here.
210 * [simantics.org](https://www.simantics.org): Post news on the release and a link to the redmine post
211 * [Members Wiki](https://www.simantics.org/members/): Update frame plan to reflect the realized dates and link to Redmine news
212 * [mailto:simantics-developers@simantics.org](mailto:simantics-developers@simantics.org) Send "newsletter" to `simantics-developers@simantics.org:
213
214 **Newsletter template:**
215 ~~~
216 Hello everyone,
217    
218 Simantics release x.y.z[.w] has been released. Head over to
219 https://www.simantics.org/redmine/news/<news number>
220 for the release news.
221
222 Best regards,
223 Simantics Release Engineering Team
224 ~~~
225
226 **Redmine news template:**
227 ~~~
228 Title: Simantics x.y.z[.w] released
229
230 Simantics x.y.z[.w] was released on <date>.
231 Please find change log at: [[simantics-platform:Simantics_xyzw|Simantics x.y.z[.w]]]
232
233 Insert some general thoughts on the release...
234 ~~~
235
236 ----
237
238 # TODO
239
240 * Create a parametrized release train pipeline build in Jenkins that creates all artifacts of a simantics release
241   * Desktop, Sysdyn, R, Simupedia, FMIL, FMI Studio
242
243
244 * 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
245  
246 * Start using https://github.com/mbarbero/fr.obeo.releng.targetplatform to generate `.target` files. `.tpd` files allow specifying version ranges instead of specific versions.
247