(use consistent release numbering in examples) |
|||
Line 23: | Line 23: | ||
=== Major or minor releases === | === Major or minor releases === | ||
AutoQA uses ''release branches'' for every major or minor release. That means before tagging a new release a new branch is always created. If we want to create new | AutoQA uses ''release branches'' for every major or minor release. That means before tagging a new release a new branch is always created. If we want to create new X.Y.0 release: | ||
<ol> | <ol> | ||
<li>Create new release branch: <pre>git checkout -b release- | <li>Create new release branch: <pre>git checkout -b release-X.Y master</pre></li> | ||
<li>[[#Update autoqa.spec|Update the {{filename|autoqa.spec}} file and commit]]</li> | <li>[[#Update autoqa.spec|Update the {{filename|autoqa.spec}} file and commit]]</li> | ||
<li>[[#Cherry-pick to master|Cherry-pick the last commit to master]]</li> | <li>[[#Cherry-pick to master|Cherry-pick the last commit to master]]</li> | ||
<li>Tag new release:<pre>git tag | <li>Tag new release:<pre>git tag vX.Y.0 release-X.Y</pre></li> | ||
<li>Push changes to remote repository:<pre>git push --tags origin master release- | <li>Push changes to remote repository:<pre>git push --tags origin master release-X.Y</pre></li> | ||
</ol> | </ol> | ||
{{admon/tip|Time of branching|It is possible to create ''release- | {{admon/tip|Time of branching|It is possible to create ''release-X.Y'' branch immediately before tagging ''X.Y.0'' release, or it is possible to do it much earlier - then we can use ''master'' for further heavy development and ''release-X.Y'' for stabilization of the current features.}} | ||
=== Revision releases === | === Revision releases === | ||
Line 42: | Line 40: | ||
<ol> | <ol> | ||
<li>Switch to correct release branch: <pre>git checkout release- | <li>Switch to correct release branch: <pre>git checkout release-X.Y</pre></li> | ||
<li>Commit the hotfixes you have prepared</li> | <li>Commit the hotfixes you have prepared</li> | ||
<li>[[#Update autoqa.spec|Update the {{filename|autoqa.spec}} file and commit]]</li> | <li>[[#Update autoqa.spec|Update the {{filename|autoqa.spec}} file and commit]]</li> | ||
<li>Tag new release:<pre>git tag | <li>Tag new release:<pre>git tag vX.Y.Z</pre></li> | ||
<li>Push changes to remote repository:<pre>git push --tags origin release- | <li>Push changes to remote repository:<pre>git push --tags origin release-X.Y</pre></li> | ||
</ol> | </ol> | ||
Line 58: | Line 56: | ||
=== Cherry-pick to master === | === Cherry-pick to master === | ||
After you tag the release on the release branch, you will want to cherry-pick the {{filename|autoqa.spec}} change (e.g. tagged with ''release- | After you tag the release on the release branch, you will want to cherry-pick the {{filename|autoqa.spec}} change (e.g. tagged with ''release-X.Y'' tag) into the master branch. | ||
# Change to the ''master'' branch <pre>git checkout master</pre> | # Change to the ''master'' branch <pre>git checkout master</pre> | ||
# Cherry-pick the updated {{filename|autoqa.spec}} change <pre>git cherry-pick release- | # Cherry-pick the updated {{filename|autoqa.spec}} change <pre>git cherry-pick release-X.Y</pre> | ||
== Closing tasks == | == Closing tasks == | ||
Line 68: | Line 66: | ||
Like many projects, the appropriate method to release a new version is by tarball. Once you have tagged the release, upload a new tarball using the following commands. | Like many projects, the appropriate method to release a new version is by tarball. Once you have tagged the release, upload a new tarball using the following commands. | ||
# Check-out the correct tag | # Check-out the correct tag <pre>git checkout vX.Y.Z</pre> | ||
# Upload a new release tarball <pre>make upload</pre> | # Upload a new release tarball <pre>make upload</pre> | ||
Line 74: | Line 72: | ||
With the tarball uploaded, it's time to package the new release as an RPM. | With the tarball uploaded, it's time to package the new release as an RPM. | ||
# Check-out the correct tag | # Check-out the correct tag <pre>git checkout vX.Y.Z</pre> | ||
# Build a source package <pre>make srpm</pre> | # Build a source package <pre>make srpm</pre> | ||
Line 108: | Line 106: | ||
=== Purging old release branches === | === Purging old release branches === | ||
If we are sure we will no longer work on older releases (e.g. before '' | If we are sure we will no longer work on older releases (e.g. before ''X.Y''), we can also delete older release branches. If W < Y, then we can delete ''release-X.W'': | ||
<pre> | <pre> | ||
git tag --contains release- | git tag --contains release-X.W # This must output some tag (like vX.W.3). | ||
# It ensures there's a tag at the tip of | # It ensures there's a tag at the tip of | ||
# the branch and therefore no work is lost. | # the branch and therefore no work is lost. | ||
git branch -D release- | git branch -D release-X.W | ||
git push origin :release- | git push origin :release-X.W | ||
</pre> | </pre> | ||
The same goes for deleting older major branches (branches ''release-Q.Y'' where Q < X). | |||
[[Category:AutoQA]] | [[Category:AutoQA]] |
Revision as of 14:37, 11 July 2011
This page describes the process for tagging, building and deploying a new version of autoqa. This page assumes a basic understanding of rpm spec
file syntax and commands such as git
, mock
and yum
.
Numbering scheme
Each release has X.Y.Z identification denoting a major, a minor and a revision number:
- Major number is increased when AutoQA makes incompatible changes in its test API. (Not used currently, since no stable public API has been offered yet.)
- Minor number is increased when AutoQA adds new features.
- Revision number is increased when AutoQA adds new hotfixes, but no new features.
Pre-requisites
You must have AutoQA source code checked out with write access (ssh:// protocol, requires gitautoqa membership):
git clone ssh://git.fedorahosted.org/git/autoqa.git cd autoqa
Git branching
All the changes must be done in a correct git branch. The description below documents the process.
Major or minor releases
AutoQA uses release branches for every major or minor release. That means before tagging a new release a new branch is always created. If we want to create new X.Y.0 release:
- Create new release branch:
git checkout -b release-X.Y master
- Update the
autoqa.spec
file and commit - Cherry-pick the last commit to master
- Tag new release:
git tag vX.Y.0 release-X.Y
- Push changes to remote repository:
git push --tags origin master release-X.Y
Revision releases
All revision releases simply mean committing relevant changesets to the relevant release branch and tagging a new release:
- Switch to correct release branch:
git checkout release-X.Y
- Commit the hotfixes you have prepared
- Update the
autoqa.spec
file and commit - Tag new release:
git tag vX.Y.Z
- Push changes to remote repository:
git push --tags origin release-X.Y
Intermediary tasks
Update autoqa.spec
Every new release must be mentioned in the rpm spec
file.
- Edit
autoqa.spec
by incrementing theVersion
and updating the%changelog
- Locally commit the changes
git commit autoqa.spec
Cherry-pick to master
After you tag the release on the release branch, you will want to cherry-pick the autoqa.spec
change (e.g. tagged with release-X.Y tag) into the master branch.
- Change to the master branch
git checkout master
- Cherry-pick the updated
autoqa.spec
changegit cherry-pick release-X.Y
Closing tasks
Upload tarball
Like many projects, the appropriate method to release a new version is by tarball. Once you have tagged the release, upload a new tarball using the following commands.
- Check-out the correct tag
git checkout vX.Y.Z
- Upload a new release tarball
make upload
Build a source RPM
With the tarball uploaded, it's time to package the new release as an RPM.
- Check-out the correct tag
git checkout vX.Y.Z
- Build a source package
make srpm
Build for applicable releases
With a source RPM created, it's time to build updated packages for any existing stable repositories. This includes Fedora 41, Fedora 40 and, depending on the time of release, potentially Fedora 39. Traditionally, this step would be handled by running the koji build --tag dist-f41-updates path/to/src.rpm
command. However, since autoqa
is not yet packaged and available in Fedora repositories, updates are built locally using mock
.
- Build packages using mock for Fedora, specify version using
RELEASEVER
variablemake mock-fedora RELEASEVER=41
- Repeat the build procedure for all desired releases
Create updates
With packages built, it's time to submit them as updates. Traditionally, this step would be handled by using the bodhi update tool. However, since autoqa
is not yet packaged and available in official Fedora repositories, a custom package repository is used to deliver updates.
- Mirror the autoqa package repository locally
rsync -avz fedorapeople.org:/srv/repos/fedora-qa/autoqa ~/public_html/ ; cd autoqa/
- Add locally built packages to the desired repositories
./move-pkgs.sh path/to/autoqa.git/rpm-build/MOCK/*/*.rpm
- Update the yum repo metadata
./update-repos.sh
- Update remote repository with changes
rsync -avz ~/public_html/autoqa fedorapeople.org:/srv/repos/fedora-qa/
Cleanup tasks
Purging old release branches
If we are sure we will no longer work on older releases (e.g. before X.Y), we can also delete older release branches. If W < Y, then we can delete release-X.W:
git tag --contains release-X.W # This must output some tag (like vX.W.3). # It ensures there's a tag at the tip of # the branch and therefore no work is lost. git branch -D release-X.W git push origin :release-X.W
The same goes for deleting older major branches (branches release-Q.Y where Q < X).