]> granicus.if.org Git - icinga2/blob - RELEASE.md
Release version 2.9.2
[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.9.2
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 sed -i "s/VERSION=.*/VERSION=$VERSION/g" RELEASE.md
68 ```
69
70 ## Changelog <a id="changelog"></a>
71
72 Update the [CHANGELOG.md](CHANGELOG.md) file.
73
74 Export these environment variables:
75
76 ```
77 export ICINGA_GITHUB_AUTH_USERNAME='user'
78 export ICINGA_GITHUB_AUTH_TOKEN='token'
79 export ICINGA_GITHUB_PROJECT='icinga/icinga2'
80 ```
81
82 Run the script which updates the [CHANGELOG.md](CHANGELOG.md) file.
83
84 ```
85 ./changelog.py
86 git diff
87 ```
88
89 ## Git Tag  <a id="git-tag"></a>
90
91 > **Major Releases**: Commit these changes to the `master` branch.
92 >
93 > **Minor Releases**: Commit changes to the `support` branch.
94
95 ```
96 git commit -v -a -m "Release version $VERSION"
97 ```
98
99 Create a signed tag (tags/v<VERSION>) on the `master` branch (for major
100 releases) or the `support` branch (for minor releases).
101
102 ```
103 git tag -s -m "Version $VERSION" v$VERSION
104 ```
105
106 Push the tag:
107
108 ```
109 git push --tags
110 ```
111
112 **For major releases:** Create a new `support` branch:
113
114 ```
115 git checkout master
116 git checkout -b support/2.9
117 git push -u origin support/2.9
118 ```
119
120 **For minor releases:** Push the support branch, cherry-pick the release commit
121 into master and merge the support branch:
122
123 ```
124 git push -u origin support/2.8
125 git checkout master
126 git cherry-pick support/2.8
127 git merge --strategy=ours support/2.8
128 git push origin master
129 ```
130
131 ## Package Builds  <a id="package-builds"></a>
132
133 ### RPM Packages  <a id="rpm-packages"></a>
134
135 ```
136 git clone git@github.com:icinga/rpm-icinga2.git && cd rpm-icinga2
137 ```
138
139 #### Branch Workflow
140
141 **Major releases** are branched off `master`.
142
143 ```
144 git checkout master && git pull
145 ```
146
147 **Bugfix releases** are created in the `release` branch and later merged to master.
148
149 ```
150 git checkout release && git pull
151 ```
152
153 #### Release Commit
154
155 Set the `Version`, `Revision` and `changelog` inside the spec file.
156
157 ```
158 sed -i "s/Version: .*/Version: $VERSION/g" icinga2.spec
159
160 vim icinga2.spec
161
162 %changelog
163 * Tue Jul 17 2018 Michael Friedrich <michael.friedrich@icinga.com> 2.9.0-1
164 - Update to 2.9.0
165 ```
166
167 ```
168 git commit -av -m "Release 2.9.0-1"
169 git push
170 ```
171
172 **Note for major releases**: Update release branch to latest.
173 `git checkout release && git pull && git merge master && git push`
174
175 **Note for minor releases**: Cherry-pick the release commit into master.
176 `git checkout master && git pull && git cherry-pick release && git push`
177
178
179 ### DEB Packages  <a id="deb-packages"></a>
180
181 ```
182 git clone git@github.com:icinga/deb-icinga2.git && cd deb-icinga2
183 ```
184
185 #### Branch Workflow
186
187 **Major releases** are branched off `master`.
188
189 ```
190 git checkout master && git pull
191 ```
192
193 **Bugfix releases** are created in the `release` branch and later merged to master.
194
195 ```
196 git checkout release && git pull
197 ```
198
199 #### Release Commit
200
201 Set the `Version`, `Revision` and `changelog` inside the spec file.
202
203 ```
204 ./dch 2.9.0-1 "Update to 2.9.0"
205 ```
206
207 ```
208 git commit -av -m "Release 2.9.0-1"
209 git push
210 ```
211
212 ```
213 git commit -av -m "Release 2.9.0-1"
214 ```
215
216 **Note for major releases**: Update release branch to latest.
217 `git checkout release && git pull && git merge master && git push`
218
219 **Note for minor releases**: Cherry-pick the release commit into master.
220 `git checkout master && git pull && git cherry-pick release && git push`
221
222
223 #### DEB with dch on macOS
224
225 ```
226 docker run -v `pwd`:/mnt/packaging -ti ubuntu:xenial bash
227
228 apt-get update
229 apt-get install git ubuntu-dev-tools vim
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 ./dch 2.9.0-1 "Update to 2.9.0"
236 ```
237
238
239 ## Build Server <a id="build-server"></a>
240
241 * Verify package build changes for this version.
242 * Test the snapshot packages for all distributions beforehand.
243 * Build the newly created Git tag for Debian/RHEL/SuSE.
244 * Build the newly created Git tag for Windows.
245
246 ## Release Tests  <a id="release-tests"></a>
247
248 * Test DB IDO with MySQL and PostgreSQL.
249 * Provision the vagrant boxes and test the release packages.
250 * Test the [setup wizard](https://packages.icinga.com/windows/) inside a Windows VM.
251 * Start a new docker container and install/run icinga2.
252
253 Example for CentOS7:
254
255 ```
256 docker run -ti centos:latest bash
257
258 yum -y install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm
259 yum -y install icinga2
260 icinga2 daemon -C
261 ```
262
263 ## GitHub Release  <a id="github-release"></a>
264
265 Create a new release for the newly created Git tag: https://github.com/Icinga/icinga2/releases
266
267 ## Chocolatey  <a id="chocolatey"></a>
268
269 Navigate to the git repository on your Windows box which
270 already has chocolatey installed. Pull/checkout the release.
271
272 Create the nupkg package:
273
274 ```
275 cpack
276 ```
277
278 Install the created icinga2 package locally:
279
280 ```
281 choco install icinga2 -version 2.9.0 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'"
282 ```
283
284 Upload the package to [chocolatey](https://chocolatey.org/packages/upload).
285
286 ## Post Release  <a id="post-release"></a>
287
288 ### Online Documentation  <a id="online-documentation"></a>
289
290 Ask @bobapple to update the documentation at docs.icinga.com.
291
292 ### Announcement  <a id="announcement"></a>
293
294 * Create a new blog post on www.icinga.com/blog
295 * Social media: [Twitter](https://twitter.com/icinga), [Facebook](https://www.facebook.com/icinga), [G+](https://plus.google.com/+icinga), [Xing](https://www.xing.com/communities/groups/icinga-da4b-1060043), [LinkedIn](https://www.linkedin.com/groups/Icinga-1921830/about)
296 * Update IRC channel topic
297
298 ### Project Management  <a id="project-management"></a>
299
300 * Add new minor version on [GitHub](https://github.com/Icinga/icinga2/milestones).
301 * Close the released version on [GitHub](https://github.com/Icinga/icinga2/milestones).