-
Notifications
You must be signed in to change notification settings - Fork 16
Release process
This is an instruction on how to release ADMC on ALT Linux. This process is mostly similar to trunk based development with some extra steps necessary to deal with ALT repository branches and testing. To perform these steps to completion you need ALT maintainer rights, which requires "join": https://www.altlinux.org/Join.
- Let's say that version
x.y.0
is ready for release. - Add a section for the new version to CHANGELOG.txt. Remember to add changelog sections from patch versions of previous versions. For example, if previous version had a patch that fixed some bug, the changelog for new major version should also indicate that the bug is fixed.
- Create a release branch from main branch. Name the branch
release/x-y-0-test
. - Switch back to main branch and bump the version. "Bumping" means changing the version in
.gear/admc.spec
tox.y+1.0
. - On release branch, turn off the "development" flag in the spec file and commit. Change line
%define _development 1
to%define _development 0
. This changes how package name is constructed from including latest hash to including latest version. Name the commit for this changerelease branch
. Don't name it after the version because you might need to add more commits.
For the next steps, you will need to have access to git.alt. See altlinux wiki for info on how to get it.
- Setup your own repo clone by running
ssh git.alt clone git://git.altlinux.org/gears/a/admc.git admc
. - If you already have a repo clone, make sure it is up to date by pulling from the gears repo.
- Add git.alt remote locally:
git remote add alt gitery.alt:packages/admc
(replacegitery.alt
with your hostname for gitery in ssh config). Note that normal "git://" style url won't work. - Pull sisyphus branch from your clone.
- Merge the release branch into sisyphus branch.
- Tag head of the sisyphus branch by running
gear-create-tag
. - Push sisyphus branch and the tag back to git.alt.
- If you got "is not inherited" error during build in sisyphus, you may have done the above steps incorrectly. Make sure you're merging new changes on top of the currently up-to-date sisyphus branch.
Depending on the volume of changes or your laziness you may skip some of this.
- Build a test task:
ssh girar build packages/admc.git x.y.0-alt1 --test-only -b p10 -m "update"
. Build another test task for p9 if you're using p9. - Install test-only task locally:
sudo apt-repo add <task-id> && sudo apt-repo update && sudo apt-get admc
. - Run admc package and make sure it at least starts up.
- Install tests
sudo apt-get install admc-test
and run all the tests. - You can also run these tests on vm's with different architectures.
This step is optional but highly recommended. Normally, releases get sent to testers automatically when they are pushed to sisyphus/p10/p9. The problem with that is that testing happens only on the p10/p9 step, so an untested release will be pushed to sisyphus. Then, if testers find any problems during p10/p9 testing, you'll have to make a new patch version just to pass testing. If you perform the steps below, the release will be tested before pushing to sisyphus.
- Create a task on redmine manually for the test-only task you just made.
- Open the task in the "p10 repository" section.
- Name it
task-id p10/your-username admc.git=x.y.0-alt1 try 1
. - Set type to "Testing".
- Assign task to "QA common user".
- Add a webery link to the task in the description: http://webery.altlinux.org/task/task-id.
- Add any other relevant info about changes to description.
- Wait for task to get tested.
If during the previous section, testers found a problem, you will have to fix it and send the release for testing again.
- Fix the problem.
- Commit fix to main branch.
- Cherry pick fix from main branch to release branch. If cherry picking is not possible because the main branch is too different from release branch, you may create separate fixes in main and release branches and deal with conflicts during merges later.
- Update CHANGELOG.txt, if needed.
- Delete tag you have previously created from local and remote sisyphus branches.
- Repeat steps in "Create sisyphus branch" section, but use
--force
option when pushing. - Instead of creating a new task, you need to modify current one
- Get info about current task:
ssh girar task show <task-id>
. - Find the # of the most recent subtask in the output, should be "x00".
- Delete old subtask:
ssh girar task delsub <task-id> <subtask-id>
. - Create new subtask:
ssh girar task add <task-id> repo packages/admc.git x.y.z-alt1
. - Run task again:
ssh girar task run <task-id> --test-only -m "update"
. - Update "try #" in task name.
- Repeat until release passes testing.
- Here's the sequence of steps to build for all three repo's using a dependency chain of tasks:
ssh girar task new sisyphus
ssh girar task new p10
ssh girar task new p9
ssh girar task add <sisyphus task id> repo packages/admc.git x.y.0-alt1
ssh girar task add <p10 task id> repo packages/admc.git x.y.0-alt1
ssh girar task add <p9 task id> repo packages/admc.git x.y.0-alt1
ssh girar task deps <p10 task id> add <sisyphus task id>
ssh girar task deps <p9 task id> add <p10 task id>
ssh girar task run <p9 task id> --commit -m "update"
ssh girar task run <p10 task id> --commit -m "update"
ssh girar task run <sisyphus task id> --commit -m "update"
- Run
ssh girar task ls
to confirm that status is correct. You should see this:
<p9 task id> POSTPONED #2 p9 admc.git=x.y.z-alt1
<p10 task id> POSTPONED #2 p10 admc.git=x.y.z-alt1
<sisyphus task id> BUILDING #1 [locked] sisyphus admc.git=x.y.z-alt1
- When testing is done, you can rename the release branch to
release/x.y.0-stable
.
In case testers still miss a problem in preliminary testing and find it later, you will have to make a patch version. You should also make patch versions for fixes that you want to release before next main version.
- Process is mostly similar to making a regular release.
- Except that you branch from the previous release instead of from main branch.
- For example, let's say a fix is contained in 1 commit. You put that commit into main branch.
- Then branch from
release/x.y.0-stable
intorelease/x.y.1-test
. - Cherry pick fix into patch branch.
- Continue with regular release procedure.