1 # Release Workflow <a id="release-workflow"></a>
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)
24 ## Preparations <a id="preparations"></a>
26 Specify the release version.
32 Add your signing key to your Git configuration file, if not already there.
38 email = michael.friedrich@icinga.com
39 name = Michael Friedrich
43 ### Issues <a id="issues"></a>
45 Check issues at https://github.com/Icinga/icinga2
47 ### Backport Commits <a id="backport-commits"></a>
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.
52 ### Authors <a id="authors"></a>
54 Update the [.mailmap](.mailmap) and [AUTHORS](AUTHORS) files:
58 git log --use-mailmap | grep '^Author:' | cut -f2- -d' ' | sort | uniq > AUTHORS
61 ## Version <a id="version"></a>
66 sed -i "s/Version: .*/Version: $VERSION/g" VERSION
69 ## Changelog <a id="changelog"></a>
71 Update the [CHANGELOG.md](CHANGELOG.md) file.
75 Export these environment variables:
78 export ICINGA_GITHUB_AUTH_USERNAME='user'
79 export ICINGA_GITHUB_AUTH_TOKEN='token'
80 export ICINGA_GITHUB_PROJECT='icinga/icinga2'
85 **Close the version on [GitHub](https://github.com/Icinga/icinga2/milestones).**
87 Run the script which updates the [CHANGELOG.md](CHANGELOG.md) file.
94 ## Git Tag <a id="git-tag"></a>
96 > **Major Releases**: Commit these changes to the `master` branch.
98 > **Minor Releases**: Commit changes to the `support` branch.
101 git commit -v -a -m "Release version $VERSION"
104 Create a signed tag (tags/v<VERSION>) on the `master` branch (for major
105 releases) or the `support` branch (for minor releases).
108 git tag -s -m "Version $VERSION" v$VERSION
117 **For major releases:** Create a new `support` branch:
123 git checkout -b support/2.11
124 git push -u origin support/2.11
127 **For minor releases:** Push the support branch, cherry-pick the release commit
128 into master and merge the support branch:
131 git push -u origin support/2.10
133 git cherry-pick support/2.10
134 git merge --strategy=ours support/2.10
135 git push origin master
138 ## Package Builds <a id="package-builds"></a>
140 ### RPM Packages <a id="rpm-packages"></a>
143 git clone git@github.com:icinga/rpm-icinga2.git && cd rpm-icinga2
148 **Major releases** are branched off `master`.
151 git checkout master && git pull
154 **Bugfix releases** are created in the `release` branch and later merged to master.
157 git checkout release && git pull
162 Set the `Version`, `Revision` and `changelog` inside the spec file.
167 sed -i "s/Version: .*/Version: $VERSION/g" icinga2.spec
172 * Tue Mar 19 2019 Michael Friedrich <michael.friedrich@icinga.com> 2.10.4-1
177 git commit -av -m "Release $VERSION-1"
181 **Note for major releases**: Update release branch to latest.
184 git checkout release && git pull && git merge master && git push
187 **Note for minor releases**: Cherry-pick the release commit into master.
190 git checkout master && git pull && git cherry-pick release && git push
194 ### DEB Packages <a id="deb-packages"></a>
197 git clone git@github.com:icinga/deb-icinga2.git && cd deb-icinga2
202 **Major releases** are branched off `master`.
205 git checkout master && git pull
208 **Bugfix releases** are created in the `release` branch and later merged to master.
211 git checkout release && git pull
216 Set the `Version`, `Revision` and `changelog` by using the `dch` helper.
221 ./dch $VERSION-1 "Update to $VERSION"
225 git commit -av -m "Release $VERSION-1"
230 **Note for major releases**: Update release branch to latest.
233 git checkout release && git pull && git merge master && git push
236 **Note for minor releases**: Cherry-pick the release commit into master.
239 git checkout master && git pull && git cherry-pick release && git push
242 #### DEB with dch on macOS
245 docker run -v `pwd`:/mnt/packaging -ti ubuntu:bionic bash
247 apt-get update && apt-get install git ubuntu-dev-tools vim -y
250 git config --global user.name "Michael Friedrich"
251 git config --global user.email "michael.friedrich@icinga.com"
255 ./dch $VERSION-1 "Update to $VERSION"
259 ## Build Server <a id="build-server"></a>
261 * Verify package build changes for this version.
262 * Test the snapshot packages for all distributions beforehand.
263 * Build the newly created Git tag for Debian/RHEL/SuSE.
264 * Wait until all jobs have passed and then publish them one by one with `allow_release`
265 * Build the newly created Git tag for Windows: `refs/tags/v2.10.0` as source and `v2.10.0` as package name.
267 ## Release Tests <a id="release-tests"></a>
269 * Test DB IDO with MySQL and PostgreSQL.
270 * Provision the vagrant boxes and test the release packages.
271 * Test the [setup wizard](https://packages.icinga.com/windows/) inside a Windows VM.
272 * Start a new docker container and install/run icinga2.
277 docker run -ti centos:latest bash
279 yum -y install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm
280 yum -y install icinga2
287 docker run -ti debian:stretch bash
289 apt-get update && apt-get install -y wget curl gnupg apt-transport-https
291 DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \
292 echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > \
293 /etc/apt/sources.list.d/${DIST}-icinga.list
294 echo "deb-src http://packages.icinga.com/debian icinga-${DIST} main" >> \
295 /etc/apt/sources.list.d/${DIST}-icinga.list
297 curl https://packages.icinga.com/icinga.key | apt-key add -
298 apt-get -y install icinga2
302 ## GitHub Release <a id="github-release"></a>
304 Create a new release for the newly created Git tag: https://github.com/Icinga/icinga2/releases
306 ## Chocolatey <a id="chocolatey"></a>
308 Navigate to the git repository on your Windows box which
309 already has chocolatey installed. Pull/checkout the release.
311 Create the nupkg package (or use the one generated on https://packages.icinga.com/windows):
317 Fetch the API key from https://chocolatey.org/account and use the `choco push`
321 choco apikey --key xxx --source https://push.chocolatey.org/
323 choco push Icinga2-v2.10.0.nupkg --source https://push.chocolatey.org/
327 ## Post Release <a id="post-release"></a>
329 ### Online Documentation <a id="online-documentation"></a>
331 Navigate to `puppet-customer/icinga.git` and do the following steps:
336 git checkout testing && git pull
337 vim files/var/www/docs/config/icinga2-latest.yml
339 git commit -av -m "icinga-web1: Update docs for Icinga 2"
344 SSH into icinga-web1 and do a manual Puppet dry run with the testing environment.
347 puppet agent -t --environment testing --noop
350 Once succeeded, continue with production deployment.
355 git checkout master && git pull
360 SSH into icinga-web2 and do a manual Puppet run from the production environment (default).
366 ### Announcement <a id="announcement"></a>
368 * Create a new blog post on [icinga.com/blog](https://icinga.com/blog) including a featured image
369 * Create a release topic on [community.icinga.com](https://community.icinga.com)
370 * Release email to team
372 ### Project Management <a id="project-management"></a>
374 * Add new minor version on [GitHub](https://github.com/Icinga/icinga2/milestones).