Skip to content

Commit

Permalink
RELEASE.md: Update release instructions
Browse files Browse the repository at this point in the history
- Remove stale info about gerrit
- Document how to create new release in github
- Document how to create new release for pypi
- Update RHEL release section
- Improve document organization

Fixes oVirt#46

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Mar 27, 2022
1 parent 8505899 commit 1aa2715
Showing 1 changed file with 79 additions and 50 deletions.
129 changes: 79 additions & 50 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,103 @@
# Releasing ovirt-imageio


## Upstream

- Add changelog entry with short description of the changes in this
release.
See https://gerrit.ovirt.org/c/109665/
1. Add changelog entry with short description of the changes in this
release:
https://github.com/oVirt/ovirt-imageio/commit/74bb6d1fe92d4054212859dc9963862effac340b

- Add new annotated tag e.g "v2.0.2"
2. Add new annotated tag e.g "vX.Y.Z"

$ git tag -a -m "Release 2.0.2 for oVirt 4.4.0" v2.0.2
$ git tag -a -m "Release X.Y.Z for oVirt 4.5.0" vX.Y.Z

- Push the tag to gerrit
3. Push the tag to github

$ git push --tags origin v2.0.2
$ git push --tags upstream vX.Y.Z

- Send a patch to releng-tools project, adding the new version:
See https://gerrit.ovirt.org/108073/
4. Create a new release in github form the new tag:
https://github.com/oVirt/ovirt-imageio/releases

## Post release
5. Download the rpms built by github, and upload them to the new
release:
https://github.com/oVirt/ovirt-imageio/releases/tag/vX.Y.Z

- Bump version for next development cycle:
https://gerrit.ovirt.org/108091/
6. Publish the release.

7. Send a patch to releng-tools project, adding the new version:
https://github.com/oVirt/releng-tools/commit/97b353b1107ba4bd06776ed4c2e31b309909a357

### Where to get the packages

This release tarball will be available immediately in github at:
https://github.com/oVirt/ovirt-imageio/releases
The packages are available via nsoffer/ovirt-imageio-preview copr repo:
https://copr.fedorainfracloud.org/coprs/nsoffer/ovirt-imageio-preview/

Packages are available via copr nsoffer/ovirt-imageio-preview repo. This
repo is enabled by ovirt-release-master.rpm.
When the releng-tools patch is be merged, the package will be
published in the official repository for the release, via the
ovirt-releaseXY.rpm.

Packages are also available in the jenkins build for the
version patch. Look for the build comment like:
https://gerrit.ovirt.org/c/108091/#message-b7b37559_79ba9e75
## Pypi

Follow the link to the build, and follow the "Built artifacts link":
https://jenkins.ovirt.org/job/ovirt-imageio_standard-on-merge/555/artifact/build-artifacts.py3.el8.x86_64/
Some oVirt project consume ovirt-imageio via the python package index
(pypi) at:
https://pypi.org/project/ovirt-imageio/

You can add a yum repo with this URL as base_url to upgrade
ovirt-imageio.
1. Clean the source tree

The packages will be available later (few hours or days) at ovirt
repositories:
https://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el8/
$ make clean

When the releng-tools patch is be merged, the package will be
published in the official repository for the release:
https://resources.ovirt.org/pub/ovirt-4.4-pre/rpm/el8/x86_64/
2. Enter the ovirt-imageio virtual environment

$ source ~/venv/ovirt-imageio/bin/activate

3. Install and update pip, build, and twine if needed

$ pip install --upgrade pip build twine

4. Build the release

This creates:
- dist/ovirt-imageio-X.Y.Z.tar.gz
- dist/ovirt_imageio-X.Y.Z-cp310-cp310-linux_x86_64.whl

We cannot publish the wheel because of binary compatibilities issues.

5. Upload the package to pypi:

python -m twine upload dist/ovirt-imageio-X.Y.Z.tar.gz

Check the project page to make sure everything looks good:
https://pypi.org/project/ovirt-imageio/X.Y.Z/

## RHEL

This parts works only inside the Red Hat network.

Login using kinit:
1. Create source rpm form the release tag

$ git checkout vX.Y.Z
$ make srpm

This source rpm is created in:
dist/ovirt-imageio-X.Y.Z-1.fc35.src.rpm

2. Login using kinit:

$ kinit
$ kinit

Clone the project with rhpkg if needed:
3. Clone the project with rhpkg if needed:

$ rhpkg clone ovirt-imageio ovirt-imageio-rhel
$ rhpkg clone ovirt-imageio ovirt-imageio-rhel

Import new sources to the right branch.
4. Import new sources to the right branch.

$ cd ovirt-imageio-rhel
$ rhpkg switch-branch rhevm-4.4-rhel-8
$ wget https://jenkins.ovirt.org/job/ovirt-imageio_standard-on-merge/555/artifact/build-artifacts.py3.el8.x86_64/ovirt-imageio-2.0.2-0.el8.src.rpm
$ rhpkg import ovirt-imageio-2.0.2-0.el8.src.rpm
$ rhpkg commit -m 'Release 2.0.2 for RHV 4.4.0'
$ cd ovirt-imageio-rhel
$ rhpkg switch-branch rhevm-4.5-rhel-8
$ rhpkg import ../ovirt-imageio/dist/ovirt-imageio-X.Y.Z-1.el8.src.rpm
$ rhpkg commit -m 'Release X.Y.Z for RHV 4.5.0'

Try a scratch build:
5. Try a scratch build:

$ rhpkg scratch-build --srpm
$ rhpkg scratch-build --srpm

If the scratch build is successful, you will get mail from brew with a
scratch repository for testing. Lookup mail with subject like:
Expand All @@ -82,30 +107,34 @@ scratch repository for testing. Lookup mail with subject like:
In the mail you will find a repository URL. The repository includes a
repo file that can be used for testing:

http://brew-task-repos.usersys.redhat.com/repos/scratch/nsoffer/ovirt-imageio/2.0.2/2.el8ev/ovirt-imageio-2.0.2-2.el8ev-scratch.repo
http://brew-task-repos.usersys.redhat.com/repos/scratch/nsoffer/ovirt-imageio/X.Y.Z/1.el8ev/ovirt-imageio-X.Y.Z-1.el8ev-scratch.repo

If the scratch build looks good, push the change and make an official
build:
6. If the scratch build looks good, push the change and make an official
build:

$ rhpkg push
$ rhpkg build
$ rhpkg push
$ rhpkg build

Brew will send you an official build repository that can be used for
testing by other developers or testers. Consider telling people about it
in rhev-devel mailing list.


## Errata

When the build is ready, you need to add the build to the errata.

Visit https://errata.devel.redhat.com/ and find the errata. To find the
errata, you can do packages search for ovirt-imageio, or vdsm.
errata, you can do packages search for ovirt-imageio.

To add the build to the errata, usually the easiest way is to use the
package NVR (name, version, release):

ovirt-imageio-2.0.2-2.el8ev
ovirt-imageio-X.Y.Z-1.el8ev

After adding the build, you may get mail about rpmdiff issues. You have
to check the reports and wave the report if needed.

## Post release

- Bump version for next development cycle:
https://github.com/oVirt/ovirt-imageio/commit/79f1d6789b833b3acc6fea20264ed57d3a5eab5e

0 comments on commit 1aa2715

Please sign in to comment.