]> granicus.if.org Git - icinga2/blob - RELEASE.md
Merge pull request #7486 from Icinga/bugfix/http-header-error-handling
[icinga2] / RELEASE.md
1 # Release Workflow <a id="release-workflow"></a>
2
3 #### Table of Content
4
5 - [1. Preparations](#preparations)
6   - [1.1. Issues](#issues)
7   - [1.2. Backport Commits](#backport-commits)
8   - [1.3. Authors](#authors)
9 - [2. Version](#version)
10 - [3. Changelog](#changelog)
11 - [4. Git Tag](#git-tag)
12 - [5. Package Builds](#package-builds)
13   - [5.1. RPM Packages](#rpm-packages)
14   - [5.2. DEB Packages](#deb-packages)
15 - [6. Build Server](#build-server)
16 - [7. Release Tests](#release-tests)
17 - [8. GitHub Release](#github-release)
18 - [9. Chocolatey](#chocolatey)
19 - [10. Post Release](#post-release)
20   - [10.1. Online Documentation](#online-documentation)
21   - [10.2. Announcement](#announcement)
22   - [10.3. Project Management](#project-management)
23
24 ## Preparations <a id="preparations"></a>
25
26 Specify the release version.
27
28 ```
29 VERSION=2.11.0-rc1
30 ```
31
32 Add your signing key to your Git configuration file, if not already there.
33
34 ```
35 vim $HOME/.gitconfig
36
37 [user]
38         email = michael.friedrich@icinga.com
39         name = Michael Friedrich
40         signingkey = D14A1F16
41 ```
42
43 ### Issues <a id="issues"></a>
44
45 Check issues at https://github.com/Icinga/icinga2
46
47 ### Backport Commits <a id="backport-commits"></a>
48
49 For minor versions you need to manually backports any and all commits from the
50 master branch which should be part of this release.
51
52 ### Authors <a id="authors"></a>
53
54 Update the [.mailmap](.mailmap) and [AUTHORS](AUTHORS) files:
55
56 ```
57 git checkout master
58 git log --use-mailmap | grep '^Author:' | cut -f2- -d' ' | sort | uniq > AUTHORS
59 ```
60
61 ## Version <a id="version"></a>
62
63 Update the version:
64
65 ```
66 sed -i "s/Version: .*/Version: $VERSION/g" VERSION
67 ```
68
69 ## Changelog <a id="changelog"></a>
70
71 Link to the milestone and closed=1 as filter.
72
73 Manually update the best of collected from the
74 milestone description.
75
76 ## Git Tag  <a id="git-tag"></a>
77
78 > **Major Releases**: Commit these changes to the `master` branch.
79 >
80 > **Minor Releases**: Commit changes to the `support` branch.
81
82 ```
83 git commit -v -a -m "Release version $VERSION"
84 ```
85
86 Create a signed tag (tags/v<VERSION>) on the `master` branch (for major
87 releases) or the `support` branch (for minor releases).
88
89 ```
90 git tag -s -m "Version $VERSION" v$VERSION
91 ```
92
93 Push the tag:
94
95 ```
96 git push --tags
97 ```
98
99 **For major releases:** Create a new `support` branch:
100
101 ```
102 git checkout master
103 git push
104
105 git checkout -b support/2.12
106 git push -u origin support/2.12
107 ```
108
109 **For minor releases:** Push the support branch, cherry-pick the release commit
110 into master and merge the support branch:
111
112 ```
113 git push -u origin support/2.11
114 git checkout master
115 git cherry-pick support/2.11
116 git merge --strategy=ours support/2.11
117 git push origin master
118 ```
119
120 ## Package Builds  <a id="package-builds"></a>
121
122 ### RPM Packages  <a id="rpm-packages"></a>
123
124 ```
125 git clone git@github.com:icinga/rpm-icinga2.git && cd rpm-icinga2
126 ```
127
128 #### Branch Workflow
129
130 **Major releases** are branched off `master`.
131
132 ```
133 git checkout master && git pull
134 ```
135
136 **Bugfix releases** are created in the `release` branch and later merged to master.
137
138 ```
139 git checkout release && git pull
140 ```
141
142 #### Release Commit
143
144 Set the `Version`, `Revision` and `changelog` inside the spec file.
145
146 ```
147 VERSION=2.11.0-rc1
148
149 sed -i "s/Version: .*/Version: $VERSION/g" icinga2.spec
150
151 vim icinga2.spec
152
153 %changelog
154 * Tue Mar 19 2019 Michael Friedrich <michael.friedrich@icinga.com> 2.10.4-1
155 - Update to 2.10.4
156 ```
157
158 ```
159 git commit -av -m "Release $VERSION-1"
160 git push
161 ```
162
163 **Note for major releases**: Update release branch to latest.
164
165 ```
166 git checkout release && git pull && git merge master && git push
167 ```
168
169 **Note for minor releases**: Cherry-pick the release commit into master.
170
171 ```
172 git checkout master && git pull && git cherry-pick release && git push
173 ```
174
175
176 ### DEB Packages  <a id="deb-packages"></a>
177
178 ```
179 git clone git@github.com:icinga/deb-icinga2.git && cd deb-icinga2
180 ```
181
182 #### Branch Workflow
183
184 **Major releases** are branched off `master`.
185
186 ```
187 git checkout master && git pull
188 ```
189
190 **Bugfix releases** are created in the `release` branch and later merged to master.
191
192 ```
193 git checkout release && git pull
194 ```
195
196 #### Release Commit
197
198 Set the `Version`, `Revision` and `changelog` by using the `dch` helper.
199
200 ```
201 VERSION=2.10.4
202
203 ./dch $VERSION-1 "Update to $VERSION"
204 ```
205
206 ```
207 git commit -av -m "Release $VERSION-1"
208 git push
209 ```
210
211
212 **Note for major releases**: Update release branch to latest.
213
214 ```
215 git checkout release && git pull && git merge master && git push
216 ```
217
218 **Note for minor releases**: Cherry-pick the release commit into master.
219
220 ```
221 git checkout master && git pull && git cherry-pick release && git push
222 ```
223
224 #### DEB with dch on macOS
225
226 ```
227 docker run -v `pwd`:/mnt/packaging -ti ubuntu:bionic bash
228
229 apt-get update && apt-get install git ubuntu-dev-tools vim -y
230 cd /mnt/packaging
231
232 git config --global user.name "Michael Friedrich"
233 git config --global user.email "michael.friedrich@icinga.com"
234
235 VERSION=2.11.0-rc1
236
237 ./dch $VERSION-1 "Update to $VERSION"
238 ```
239
240
241 ## Build Server <a id="build-server"></a>
242
243 * Verify package build changes for this version.
244 * Test the snapshot packages for all distributions beforehand.
245 * Build the newly created Git tag for Debian/RHEL/SuSE.
246   * Wait until all jobs have passed and then publish them one by one with `allow_release`
247 * Build the newly created Git tag for Windows: `refs/tags/v2.10.0` as source and `v2.10.0` as package name.
248
249 ## Release Tests  <a id="release-tests"></a>
250
251 * Test DB IDO with MySQL and PostgreSQL.
252 * Provision the vagrant boxes and test the release packages.
253 * Test the [setup wizard](https://packages.icinga.com/windows/) inside a Windows VM.
254 * Start a new docker container and install/run icinga2.
255
256 ### CentOS
257
258 ```
259 docker run -ti centos:latest bash
260
261 yum -y install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm
262 yum -y install icinga2
263 icinga2 daemon -C
264 ```
265
266 ### Debian
267
268 ```
269 docker run -ti debian:stretch bash
270
271 apt-get update && apt-get install -y wget curl gnupg apt-transport-https
272
273 DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \
274  echo "deb https://packages.icinga.com/debian icinga-${DIST} main" > \
275  /etc/apt/sources.list.d/${DIST}-icinga.list
276  echo "deb-src https://packages.icinga.com/debian icinga-${DIST} main" >> \
277  /etc/apt/sources.list.d/${DIST}-icinga.list
278
279 curl https://packages.icinga.com/icinga.key | apt-key add -
280 apt-get -y install icinga2
281 icinga2 daemon
282 ```
283
284 ## GitHub Release  <a id="github-release"></a>
285
286 Create a new release for the newly created Git tag: https://github.com/Icinga/icinga2/releases
287
288 > Hint: Choose [tags](https://github.com/Icinga/icinga2/tags), pick one to edit and
289 > make this a release. You can also create a draft release.
290
291 The release body should contain a short changelog, with links
292 into the roadmap, changelog and blogpost.
293
294
295 ## Chocolatey  <a id="chocolatey"></a>
296
297 Navigate to the git repository on your Windows box which
298 already has chocolatey installed. Pull/checkout the release.
299
300 Create the nupkg package (or use the one generated on https://packages.icinga.com/windows):
301
302 ```
303 cpack
304 ```
305
306 Fetch the API key from https://chocolatey.org/account and use the `choco push`
307 command line.
308
309 ```
310 choco apikey --key xxx --source https://push.chocolatey.org/
311
312 choco push Icinga2-v2.11.0.nupkg --source https://push.chocolatey.org/
313 ```
314
315
316 ## Post Release  <a id="post-release"></a>
317
318 ### Online Documentation  <a id="online-documentation"></a>
319
320 > Only required for major releases.
321
322 Navigate to `puppet-customer/icinga.git` and do the following steps:
323
324 #### Testing
325
326 ```
327 git checkout testing && git pull
328 vim files/var/www/docs/config/icinga2-latest.yml
329
330 git commit -av -m "icinga-web: Update docs for Icinga 2"
331
332 git push
333 ```
334
335 SSH into the webserver and do a manual Puppet dry run with the testing environment.
336
337 ```
338 puppet agent -t --environment testing --noop
339 ```
340
341 Once succeeded, continue with production deployment.
342
343 #### Production
344
345 ```
346 git checkout master && git pull
347 git merge testing
348 git push
349 ```
350
351 SSH into the webserver and do a manual Puppet run from the production environment (default).
352
353 ```
354 puppet agent -t
355 ```
356
357 #### Manual Generation
358
359 SSH into the webserver or ask @bobapple.
360
361 ```
362 cd /usr/local/icinga-docs-tools && ./build-docs.rb -c /var/www/docs/config/icinga2-latest.yml
363 ```
364
365 ### Announcement  <a id="announcement"></a>
366
367 * Create a new blog post on [icinga.com/blog](https://icinga.com/blog) including a featured image
368 * Create a release topic on [community.icinga.com](https://community.icinga.com)
369 * Release email to net-tech & team
370
371 ### Project Management  <a id="project-management"></a>
372
373 * Add new minor version on [GitHub](https://github.com/Icinga/icinga2/milestones).