[sysadmin-bin] Ensure container registry is enabled for GNOME projects
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Ensure container registry is enabled for GNOME projects
- Date: Tue, 23 Jun 2020 12:52:35 +0000 (UTC)
commit 889b7ab2fed6ae72dca6a329460831d72a7543aa
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue Jun 23 14:51:37 2020 +0200
Ensure container registry is enabled for GNOME projects
gitlab/gitlab-operations.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gitlab/gitlab-operations.py b/gitlab/gitlab-operations.py
index f0f286a..5107617 100755
--- a/gitlab/gitlab-operations.py
+++ b/gitlab/gitlab-operations.py
@@ -99,8 +99,9 @@ for project in projects:
if not default_branch:
default_branch = 'master'
+ # Ensure stable branches are protected
try:
- proj = gl.projects.get(project.id, lazy=True)
+ proj = gl.projects.get(project.id)
branches = [branch.name for branch in proj.branches.list()]
stable_branches_regex = re.compile(r'gnome-\d-\d\d')
stable_branches = set(filter(stable_branches_regex.match, branches))
@@ -114,9 +115,14 @@ for project in projects:
branch = proj.branches.get(branch_name, lazy=True)
branch.protect(developers_can_push=True, developers_can_merge=True)
except gitlab.exceptions.GitlabListError as e:
+ # Some projects are not used for git hosting
if e.response_code == 404:
pass
+ # Ensure container registry is enabled for GNOME projects
+ proj.container_registry_enabled = True
+ proj.save()
+
try:
nodes = semi_rdf.read_rdf(doap_url % (project_name, default_branch, project_name))
except SAXParseException:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]