2019-08-14 09:38:18 +02:00
|
|
|
# Release Workflow
|
|
|
|
|
|
|
|
## Preparations
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
Specify the release version.
|
|
|
|
|
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
VERSION=2.7.0
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Add your signing key to your Git configuration file, if not already there.
|
|
|
|
|
|
|
|
```
|
|
|
|
vim $HOME/.gitconfig
|
|
|
|
|
|
|
|
[user]
|
|
|
|
email = michael.friedrich@icinga.com
|
|
|
|
name = Michael Friedrich
|
|
|
|
signingkey = D14A1F16
|
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Issues
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
Check issues at https://github.com/Icinga/icingaweb2
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Backport Commits
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
For minor versions not branched off git master you need
|
2019-05-06 12:52:30 +02:00
|
|
|
to manually backport any and all commits from the
|
2018-04-26 14:32:31 +02:00
|
|
|
master branch which should be part of this release.
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Authors
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2015-06-18 16:01:30 +02:00
|
|
|
Update the [.mailmap](.mailmap) and [AUTHORS](AUTHORS) files:
|
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
git log --use-mailmap | grep '^Author:' | cut -f2- -d' ' | sort | uniq > AUTHORS
|
|
|
|
```
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Version
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
Update the version in the following files:
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
* [VERSION](VERSION)
|
|
|
|
* Application Version: [library/Icinga/Application/Version.php](library/Icinga/Application/Version.php)
|
|
|
|
* Module Versions in `modules/*/module.info`
|
2015-09-30 18:17:27 +02:00
|
|
|
|
|
|
|
Commands:
|
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
echo "v$VERSION" > VERSION
|
2019-05-06 12:52:30 +02:00
|
|
|
sed -i "s/const VERSION = '.*'/const VERSION = '$VERSION'/g" library/Icinga/Application/Version.php
|
|
|
|
find . -type f -name '*.info' -exec sed -i "s/Version: .*/Version: $VERSION/g" {} \;
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Changelog
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Choose the most important issues and summarize them in multiple groups/paragraphs. Provide links to the mentioned
|
|
|
|
issues/PRs. At the start include a link to the milestone's closed issues.
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2020-04-20 09:02:08 +02:00
|
|
|
Make sure to check for issues/PRs with the label `affects-upgrades` and include them in
|
|
|
|
the [upgrading documentation](doc/80-Upgrading.md).
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Git Tag
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
git commit -v -a -m "Release version $VERSION"
|
|
|
|
```
|
|
|
|
|
|
|
|
Create a signed tag (tags/v<VERSION>) on the `master` branch (for major
|
|
|
|
releases) or the `support` branch (for minor releases).
|
|
|
|
|
|
|
|
```
|
|
|
|
git tag -s -m "Version $VERSION" v$VERSION
|
|
|
|
```
|
|
|
|
|
|
|
|
Push the tag:
|
|
|
|
|
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
git push v$VERSION
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
**For major releases:** Create a new `support` branch:
|
|
|
|
|
|
|
|
```
|
|
|
|
git checkout master
|
2019-08-14 09:38:18 +02:00
|
|
|
git checkout -b support/2.7
|
|
|
|
git push -u origin support/2.7
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Package Builds
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### RPM Packages
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
git clone git@git.icinga.com:packaging/rpm-icingaweb2.git && cd rpm-icingaweb2
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### DEB Packages
|
2015-09-30 18:17:27 +02:00
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
git clone git@git.icinga.com:packaging/deb-icingaweb2.git && cd deb-icingaweb2
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Branch Workflow
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Checkout `master` and create a new branch.
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
* For releases use x.x[.x] as branch name (e.g. 2.7 or 2.7.1)
|
|
|
|
* For releases with revision use x.x.x-n (e.g. 2.7.0-2)
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Switch Build Type (For RPM and DEB)
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Edit file `.gitlab-ci.yml` and comment variable `ICINGA_BUILD_TYPE` out.
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
```yaml
|
|
|
|
variables:
|
|
|
|
...
|
|
|
|
#ICINGA_BUILD_TYPE: snapshot
|
|
|
|
...
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Commit the change.
|
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
git commit -av -m "Switch build type for $VERSION-1"
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
#### RPM Release Preparations
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Set the `Version`, `revision` and `%changelog` inside the spec file:
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
sed -i "s/Version:.*/Version: $VERSION/g" icingaweb2.spec
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
vim icingaweb2.spec
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
%changelog
|
|
|
|
* Tue Jul 30 2019 Johannes Meyer <johannes.meyer@icinga.com> 2.7.0-1
|
|
|
|
- Update to 2.7.0
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
#### DEB Release Preparations
|
|
|
|
|
|
|
|
Update file `debian/changelog` and add at the beginning:
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
2019-08-14 09:38:18 +02:00
|
|
|
icingaweb2 (2.7.0-1) icinga; urgency=medium
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
* Release 2.7.0-1
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
-- Eric Lippmann <eric.lippmann@icinga.com> Tue, 30 Jul 2019 09:28:52 +0000
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
```
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Release Commit (For RPM and DEB)
|
|
|
|
|
|
|
|
Commit the changes and push the branch.
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
```
|
2019-04-26 09:47:20 +02:00
|
|
|
git commit -av -m "Release $VERSION-1"
|
2019-08-14 09:38:18 +02:00
|
|
|
git push origin 2.7
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Gitlab will now build snapshot packages based on the tag `v2.7.0` of Icinga Web 2.
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Package Tests
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
In order to test the created packages you can download a job's artifacts:
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Visit [git.icinga.com](https://git.icinga.com/packaging/rpm-icingaweb2)
|
|
|
|
and navigate to the respective pipeline under `CI / CD -> Pipelines`.
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
There click on the job you want to download packages from:
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
![Pipeline Jobs](doc/res/gitlab-rpm-package-pipeline-jobs.png "Pipeline Jobs")
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
The job's output appears. On the right-hand sidebar you can browse its artifacts:
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
![Job Artifacts](doc/res/gitlab-job-artifacts.png "Job Artifacts")
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Once there, navigate to `build/RPMS/noarch` where you'll find the packages.
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Release Packages
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
To build release packages and upload them to [packages.icinga.com](https://packages.icinga.com)
|
|
|
|
tag the release commit and push it.
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
```
|
|
|
|
git tag -s 2.7.0-1
|
|
|
|
git push origin 2.7.0-1
|
2018-04-26 14:32:31 +02:00
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Now cherry pick the release commit to `master` so that the changes are transferred back to it.
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
**Attention**: Only the release commit. *NOT* the one switching the build type!
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Release Tests
|
2015-06-18 16:01:30 +02:00
|
|
|
|
|
|
|
* Provision the vagrant boxes and test the release packages.
|
2019-04-26 09:47:20 +02:00
|
|
|
* * Start a new docker container and install/run Icinga Web 2 & icingacli.
|
|
|
|
|
|
|
|
### CentOS
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -ti centos:latest bash
|
|
|
|
|
|
|
|
yum -y install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm
|
|
|
|
yum -y install centos-release-scl
|
|
|
|
yum -y install icingaweb2 icingacli
|
|
|
|
icingacli
|
|
|
|
```
|
|
|
|
|
|
|
|
### Debian
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -ti debian:stretch bash
|
|
|
|
|
|
|
|
apt-get update && apt-get install -y wget curl gnupg apt-transport-https
|
|
|
|
|
|
|
|
DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \
|
|
|
|
echo "deb https://packages.icinga.com/debian icinga-${DIST} main" > \
|
|
|
|
/etc/apt/sources.list.d/${DIST}-icinga.list
|
|
|
|
echo "deb-src https://packages.icinga.com/debian icinga-${DIST} main" >> \
|
|
|
|
/etc/apt/sources.list.d/${DIST}-icinga.list
|
|
|
|
|
|
|
|
curl https://packages.icinga.com/icinga.key | apt-key add -
|
|
|
|
apt-get -y install icingaweb2 icingacli
|
|
|
|
icingacli
|
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## GitHub Release
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
Create a new release for the newly created Git tag: https://github.com/Icinga/icingaweb2/releases
|
|
|
|
|
2019-04-26 09:47:20 +02:00
|
|
|
> Hint: Choose [tags](https://github.com/Icinga/icingaweb2/tags), pick one to edit and
|
|
|
|
> make this a release. You can also create a draft release.
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
Use the changelog for the release body.
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2020-08-10 12:11:54 +02:00
|
|
|
## Docker
|
|
|
|
|
|
|
|
> Only for final versions (not for RCs).
|
|
|
|
|
|
|
|
Once the release has been published on GitHub, wait for its
|
|
|
|
[GitHub actions](https://github.com/Icinga/icingaweb2/actions) to complete.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
VERSION=2.9.1
|
|
|
|
|
|
|
|
TAGS=(2.9)
|
|
|
|
#TAGS=(2.9 2 latest)
|
|
|
|
|
|
|
|
docker pull icinga/icingaweb2:$VERSION
|
|
|
|
|
|
|
|
for t in "${TAGS[@]}"; do
|
|
|
|
docker tag icinga/icingaweb2:$VERSION icinga/icingaweb2:$t
|
|
|
|
done
|
|
|
|
|
|
|
|
for t in "${TAGS[@]}"; do
|
|
|
|
docker push icinga/icingaweb2:$t
|
|
|
|
done
|
|
|
|
```
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Online Documentation
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-04-26 09:47:20 +02:00
|
|
|
This is built with a daily cronjob.
|
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
### Manual Updates
|
2019-04-26 09:47:20 +02:00
|
|
|
|
2019-05-06 12:52:30 +02:00
|
|
|
SSH into the webserver or ask [bobapple](https://github.com/bobapple).
|
2019-04-26 09:47:20 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
cd /usr/local/icinga-docs-tools && ./build-docs.rb -c /var/www/docs/config/icingaweb2-latest.yml
|
|
|
|
```
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Announcement
|
2015-06-18 16:01:30 +02:00
|
|
|
|
2019-04-26 09:47:20 +02:00
|
|
|
* Create a new blog post on [icinga.com/blog](https://icinga.com/blog) including a featured image
|
|
|
|
* Create a release topic on [community.icinga.com](https://community.icinga.com)
|
|
|
|
* Release email to net-tech & team
|
2018-04-26 14:32:31 +02:00
|
|
|
|
2019-08-14 09:38:18 +02:00
|
|
|
## Project Management
|
2018-04-26 14:32:31 +02:00
|
|
|
|
|
|
|
* Add new minor version on [GitHub](https://github.com/Icinga/icingaweb2/milestones).
|
|
|
|
* Close the released version on [GitHub](https://github.com/Icinga/icingaweb2/milestones).
|