Commit aebf11bd authored by Cyril 'kibi' Brulebois's avatar Cyril 'kibi' Brulebois
Browse files

Merge branch 'origin/feature/17589-gitlab-triage-post-release' (Closes: #17589)

parents 9eb29299 acba77e6
#!/usr/bin/python3
from gitlab.config import GitlabConfigParser
import sys
gitlab_id = sys.argv[1]
print(GitlabConfigParser(gitlab_id=gitlab_id).private_token)
#!/bin/sh
set -e
set -u
set -x
export DOCKER_ARGS="--env VERSION --env NEXT_PLANNED_VERSION"
"$(dirname "$0")"/../config/gitlab-triage/bin/gitlab-triage \
--source-id tails --source groups \
--policies-file /etc/gitlab-triage-policies/release_management/missed-resources.yml \
"${@}"
#!/usr/bin/python3
from gitlab.config import GitlabConfigParser
import sys
gitlab_id = sys.argv[1]
print(GitlabConfigParser(gitlab_id=gitlab_id).url)
FROM debian:stable
RUN set -eux ; \
apt-get -q update ; \
DEBIAN_FRONTEND=noninteractive apt-get -qy install ruby
RUN gem install gitlab-triage
#!/bin/sh
set -e
set -u
set -x
# Update Docker image tails:gitlab-triage-stable is based on
docker image pull debian:stable
# Build our own Docker image
docker build --tag tails:gitlab-triage-stable "$(dirname "$0")/.."
# Remove dangling Docker images
docker image prune --force
#! /bin/sh
# Wrapper to run gitlab-triage (https://gitlab.com/gitlab-org/gitlab-triage)
# in Docker
set -e
set -u
set -x
GITLAB_TRIAGE_POLICIES_DIR="$(readlink -f "$(dirname "$0")"/../policies)"
docker run \
--name tails-gitlab-triage \
--rm \
--volume "${GITLAB_TRIAGE_POLICIES_DIR}":/etc/gitlab-triage-policies \
${DOCKER_ARGS:-} \
tails:gitlab-triage-stable \
/usr/local/bin/gitlab-triage "${@}"
.label-missed-resources: &label-missed-resources
rules:
- name: Postpone resources that missed their milestone
conditions:
state: opened
milestone: any
ruby: |
return false unless ENV['VERSION']
return false unless ENV['NEXT_PLANNED_VERSION']
return false unless milestone&.title == "Tails_#{ENV['VERSION']}"
Date.today >= milestone.due_date
actions:
comment: |
/label ~"missed:#{ENV['VERSION']}"
/milestone %"Tails_#{ENV['NEXT_PLANNED_VERSION']}"
resource_rules:
issues:
*label-missed-resources
merge_requests:
*label-missed-resources
......@@ -17,7 +17,7 @@ Packages
To release Tails you'll need some packages installed:
* `gitlab-cli jq tidy mktorrent transmission-cli`
* `docker.io gitlab-cli jq tidy mktorrent transmission-cli`
* [[!debpts squashfs-tools]] 1:4.4-1+0.tails1
from our custom `iukbuilder-stretch` APT suite.
* `iuk` [[dependencies|contribute/release_process/tails-iuk#build-deps]]
......@@ -38,15 +38,13 @@ To release Tails you need:
[global]
ssl_verify = true
[Tails]
[TailsRM]
url = https://gitlab.tails.boum.org
per_page = 100
private_token = XXX
[[!tails_gitlab profile/personal_access_tokens
desc="Generate a _Personal Access Token_"]] with at least the `api` scope
enabled, and set it as the value of the `private_token` option
in your `~/.python-gitlab.cfg`.
Set the value of the `private_token` option to the `role-release-automation`
GitLab user's API token, which you'll find in `rm.git`'s keyringer.
Environment
===========
......@@ -98,6 +96,8 @@ Export the following environment variables:
release).
* `NEXT_PLANNED_BUGFIX_VERSION`: set to the version number of the next
scheduled *bugfix* Tails release
* `NEXT_PLANNED_VERSION`: use whichever is the next scheduled release
among `$NEXT_PLANNED_BUGFIX_VERSION` and `$NEXT_PLANNED_MAJOR_VERSION`
* `NEXT_POTENTIAL_EMERGENCY_VERSION`: set to the version number we'll give
to the next emergency release if we have to put one out; unset for a
release candidate
......@@ -1687,37 +1687,36 @@ Bug tracker
Skip this part if preparing a release candidate.
Sign in on GitLab as the `role-release-automation` user (credentials are
in `rm.git`'s keyringer).
Postpone to next release any remaining open issue for the version
you've just released:
1. Verify there's a `missed:$VERSION` label
on [[!tails_gitlab groups/tails/-/labels]]; if there's none,
ask sysadmins to create one via `gitlab-config.git`.
2. Visit the [[!tails_gitlab tails/tails/-/issues desc="issues"]]
by filtering for the Milestone you've just released.
3. Click the _Edit issues_ link in the top right corner.
4. In the right side bar:
- select the milestone for the next scheduled release
- select the `missed:$VERSION` label
5. On the top left of the list of issues, click the checkbox
that will select all issues.
6. In the right side bar, click _Update all_.
7. If some issues still appear on the list, go through these steps again:
there's pagination involved and
[[!tails_gitlab help/user/project/bulk_editing.html desc="bulk editing"]]
only applies to issues that are displayed.
Then, do the same for MRs.
Ideally we would [[!tails_ticket 17589 desc="automate this"]].
Then, close the just-released [[!tails_gitlab groups/tails/-/milestones
desc="milestone"]].
Finally, sign out from the `role-release-automation` GitLab user.
submit a MR against [[!tails_gitlab tails/gitlab-config]]
to create one.
2. Ensure you have an up-to-date `tails:gitlab-triage-stable` Docker image:
cd "${MASTER_CHECKOUT:?}" && \
git checkout master && \
sudo ./config/gitlab-triage/bin/ensure-up-to-date-Docker-image
3. Postpone to the next scheduled release any remaining open issue and merge
request for the version you've just released:
cd "${MASTER_CHECKOUT:?}" && \
git checkout master && \
sudo \
VERSION="${VERSION:?}" \
NEXT_PLANNED_VERSION="${NEXT_PLANNED_VERSION:?}" \
./bin/gitlab-triage-post-release \
--host-url "$(bin/gitlab-url TailsRM)" \
--token "$(bin/gitlab-api-token TailsRM)"
4. Finally, submit a MR against [[!tails_gitlab tails/gitlab-config]] to:
- close the just-released [[!tails_gitlab groups/tails/-/milestones
desc="milestone"]]
- set the *Due date* for the [[!tails_gitlab groups/tails/-/milestones
desc="*Holes in the Roof* milestone"]] to a date between the next
2 releases
### Tickets linked from the website
......@@ -1729,7 +1728,7 @@ be resolved in this release.
find wiki/src/{doc,support} ! -path wiki/src/support/known_issues/graphics.mdwn -name "*.mdwn" -o -name "*.html" | xargs cat | \
ruby -e 'puts STDIN.read.scan(/\[\[!tails_ticket\s+(\d+)[^\]]*\]\]/)' | \
while read ticket; do
ticket_status="$(python-gitlab --gitlab Tails -o json --fields state project-issue get --project-id 2 --iid "$ticket" | jq --raw-output .state)"
ticket_status="$(python-gitlab --gitlab TailsRM -o json --fields state project-issue get --project-id 2 --iid "$ticket" | jq --raw-output .state)"
if [ -z "${ticket_status:-}" ]; then
echo "Failed to find the status of #${ticket:?}" >&2
continue
......@@ -1901,10 +1900,6 @@ If you just released a final release
<https://jenkins.tails.boum.org/>.
1. Make sure you pushed all changes in every of our Git repo (including our
Debian packages ones).
1. Ask sysadmins to set the *Due date* for the [[!tails_gitlab
groups/tails/-/milestones
desc="*Holes in the Roof* milestone"]] to a date between
the next 2 releases, via `gitlab-config.git`.
1. In [[contribute/calendar]], remove the entries about the version that you've
just released.
1. Check the Mozilla release calendars:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment