Retire all single charm repositories

The sunbeam-charms mono-repo now replaces all individual charm
repositories - remove from the Sunbeam project.

Update validate-legacy.py to deal with repositories which don't
use a default branch of 'master'.

Change-Id: Id5e72114e73a765285c99a21e23c4d6eaa3c15ea
This commit is contained in:
James Page 2023-12-12 11:21:04 +00:00
parent 7d97a0b2cd
commit c2abd80863
No known key found for this signature in database
GPG Key ID: BFECAECBA0E7D8C3
3 changed files with 50 additions and 28 deletions

View File

@ -2275,6 +2275,35 @@ solum:
repos:
- openstack/solum-tempest-plugin
sunbeam:
irc-channel: openstack-sunbeam
service: Deployment and operational tooling for OpenStack
url: https://opendev.org/openstack/sunbeam-charms/src/branch/main/ops-sunbeam/README.rst
partial: yes
deliverables:
sunbeam-charms:
retired-on: 2024-04-30
repos:
- openstack/charm-aodh-k8s
- openstack/charm-barbican-k8s
- openstack/charm-ceilometer-k8s
- openstack/charm-cinder-ceph-k8s
- openstack/charm-cinder-k8s
- openstack/charm-designate-bind-k8s
- openstack/charm-designate-k8s
- openstack/charm-glance-k8s
- openstack/charm-gnocchi-k8s
- openstack/charm-heat-k8s
- openstack/charm-horizon-k8s
- openstack/charm-keystone-k8s
- openstack/charm-magnum-k8s
- openstack/charm-neutron-k8s
- openstack/charm-nova-k8s
- openstack/charm-octavia-k8s
- openstack/charm-openstack-hypervisor
- openstack/charm-ops-sunbeam
- openstack/charm-placement-k8s
swift:
irc-channel: openstack-swift
service: Object Storage service

View File

@ -2391,30 +2391,11 @@ sunbeam:
containing many 1000's of hypervisors - leveraging a hybrid deployment
model using Juju to manage both Kubernetes components and machine based
components through the use of charms.
url: https://opendev.org/openstack/charm-ops-sunbeam/src/branch/main/README.rst
url: https://opendev.org/openstack/sunbeam-charms/src/branch/main/ops-sunbeam/README.rst
deliverables:
sunbeam-charms:
release-management: external
repos:
- openstack/charm-aodh-k8s
- openstack/charm-barbican-k8s
- openstack/charm-ceilometer-k8s
- openstack/charm-cinder-ceph-k8s
- openstack/charm-cinder-k8s
- openstack/charm-designate-bind-k8s
- openstack/charm-designate-k8s
- openstack/charm-glance-k8s
- openstack/charm-gnocchi-k8s
- openstack/charm-heat-k8s
- openstack/charm-horizon-k8s
- openstack/charm-keystone-k8s
- openstack/charm-magnum-k8s
- openstack/charm-neutron-k8s
- openstack/charm-nova-k8s
- openstack/charm-octavia-k8s
- openstack/charm-openstack-hypervisor
- openstack/charm-ops-sunbeam
- openstack/charm-placement-k8s
- openstack/sunbeam-charms
swift:
ptl:

View File

@ -20,7 +20,7 @@ import sys
import requests
import yaml
FILES_URL = "https://opendev.org/api/v1/repos/{}/git/trees/master"
FILES_URL = "https://opendev.org/api/v1/repos/{}/git/trees/{}"
IGNORED_REPOS = [
# NOTE(gmann): The below list represent the prefix of the old uncleaned
# retired repositories. They are too many and not worth to cleanup now.
@ -105,14 +105,26 @@ for team_name, team_data in legacy_projects.items():
print(msg)
continue
url = FILES_URL.format(repo)
files = requests.get(url).json()
file_names = sorted([f['path'] for f in files['tree']])
for branch in ('master', 'main'):
try:
url = FILES_URL.format(repo, branch)
files = requests.get(url).json()
file_names = sorted([f['path'] for f in files['tree']])
break
except KeyError:
# Try with next default branch!
pass
if file_names != ['.gitreview', 'README.rst']:
msg = '{} is not properly retired, files: {}.'.format(
repo, file_names)
print(msg)
try:
for file in file_names:
if file not in ('.gitreview', 'README.rst'):
msg = '{} is not properly retired, files: {}.'.format(
repo, file_names)
print(msg)
errors += 1
continue
except NameError:
print("Unable to detect default branch")
errors += 1
continue