theforeman/foreman-docker

View on GitHub
release/RELEASE.md

Summary

Maintainability
Test Coverage
# Release process

This document will cover process and tips regarding foreman-docker releases.
It should serve as a reference to the person doing the release, however the project should
strive to automate as much as possible of this process.

A preliminary script for all actions required in this repository can be found under this repository
under the namerollout-release.

## Versioning

`foreman-docker` follows [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html). This means:
* MAJOR versions: break compatibility with the latest supported Foreman version. For instance, foreman-docker 1.0 breaks Foreman 1.6 compatibility.
* MINOR versions: enhance foreman-docker with features in a backwards-compatible manner.
* PATCH versions: contain bugfixes for the latest minor version in a backwards-compatible manner.

`foreman-docker` will always contain a git tag for each specific version, x.y.z.
Major versions are maintained in `-stable` branches. As an example, when 2.0 is released, it goes in
the 2.0-stable branch. When 2.1.0 is released, the 2.0-stable branch is updated to include the changes.

## Frequency

Releases are done weekly unless there were not any commits merged in between releases.

## Tips before releasing

* Test against the current Foreman version. For instance, the person releasing 1.0.2, should
ensure it works well with Foreman 1.7 as that is the version supported by 1.y.z releases.
* Always test using Foreman and Katello, as Katello will depend on `foreman-docker` for some tasks.
Use the latest Katello version that is stable with the Foreman version supported.
* Make sure there are no discrepancies in the dependencies specified in the gemspec versus the
dependencies of the RPM spec and deb sources.
* If any dependency in the gemspec was updated, and the package in foreman-packaging does not serve
it, update the package or consider dropping the dependency.
* Test tagging, branching, and pushing changes to your local fork first. Only if it looks then you
should do the same in the project repository.

These sanity checks should become less and less necessary as end-to-end tests improve and integration tests are added.

## Process

* Test the master branch according to the tips mentioned above
* Bump `lib/foreman_docker/version.rb` according to the Versioning policy specified in this document.
* Run `changelog` and update the `Contributors` and `CHANGELOG` files with those generated by the
script
* `git add` your changes
* `git commit -m "Bump version to x.y.z"`
* `git push upstream master`
* `git tag x.y.z`
* `git push upstream x.y.z`
* `git checkout x.0-stable`
* `git pull --rebase upstream master`
* `git push upstream x.0-stable`
* `gem build foreman_docker.gemspec`
* `gem push foreman_docker-x.y.z.gem`

### In [foreman-packaging](https://github.com/theforeman/foreman-packaging)

* `git checkout rpm/develop`
* `git pull --rebase upstream rpm/develop`
* `git checkout -b rpm/foreman-docker-x.y.z`
* Read rubygem-foreman_docker.spec and ensure dependency versions are the same as in the gemspec
* Update changelog (add date and message) and bump Version in spec
* `git rm rubygem-foreman_docker/foreman_docker-previous_version.gem`
* Copy your previously built `foreman_docker-x.y.z.gem` to `rubygem-foreman_docker`
* `git annex add rubygem-foreman_docker/foreman_docker-x.y.z.gem`
* `git add` all changes but the gem itself (annex handles that)
* `git commit -m "plugins:foreman_docker - Release x.y.z"`
* `git push origin rpm/foreman-docker-x.y.z`
* Go to [foreman-packaging](https://github.com/theforeman/foreman-packaging) and submit PR to
rpm/develop branch
* `git checkout deb/develop`
* `git pull --rebase upstream deb/develop`
* `git checkout -b deb/foreman-docker-x.y.z`
* `cd plugins/ruby-foreman-docker`
* Bump version in foreman_docker.rb
* Update changelog (date and message) in debian/changelog
* Update gem.list in debian/gem.list (also update dependencies if needed)
* `git add .`
* `git commit -m "plugins:foreman_docker - Release x.y.z"`
* `git push origin deb/foreman-docker-x.y.z`
* Go to [foreman-packaging](https://github.com/theforeman/foreman-packaging) and submit PR to
deb/develop branch