Support subsets of platforms in update-test-platforms
This lets us specify that we want to run a job on all "ubuntu" platforms. Change-Id: Ib466d719d3de241a6bd31ed4896cbeb96452aea8
This commit is contained in:
@@ -29,24 +29,39 @@ import ruamellib
|
|||||||
# There are fedora- and debian-latest nodesets, but they can't be used
|
# There are fedora- and debian-latest nodesets, but they can't be used
|
||||||
# in the multinode jobs, so just use the real labels everywhere.
|
# in the multinode jobs, so just use the real labels everywhere.
|
||||||
|
|
||||||
PLATFORMS = [
|
CENTOS_PLATFORMS = [
|
||||||
# 'gentoo-17-0-systemd',
|
|
||||||
'centos-7',
|
'centos-7',
|
||||||
'centos-8-stream',
|
'centos-8-stream',
|
||||||
'centos-9-stream',
|
'centos-9-stream',
|
||||||
'debian-bullseye',
|
]
|
||||||
|
DEBIAN_PLATFORMS = [
|
||||||
'debian-buster',
|
'debian-buster',
|
||||||
'fedora-35',
|
'debian-bullseye',
|
||||||
'opensuse-15',
|
]
|
||||||
|
UBUNTU_PLATFORMS = [
|
||||||
'ubuntu-bionic',
|
'ubuntu-bionic',
|
||||||
'ubuntu-focal',
|
'ubuntu-focal',
|
||||||
'ubuntu-jammy',
|
'ubuntu-jammy',
|
||||||
]
|
]
|
||||||
|
OTHER_PLATFORMS = [
|
||||||
|
'fedora-35',
|
||||||
|
# 'gentoo-17-0-systemd',
|
||||||
|
'opensuse-15',
|
||||||
|
]
|
||||||
|
ALL_PLATFORMS = (CENTOS_PLATFORMS + DEBIAN_PLATFORMS +
|
||||||
|
UBUNTU_PLATFORMS + OTHER_PLATFORMS)
|
||||||
|
|
||||||
# insert a platform from above to make it non-voting
|
# insert a platform from above to make it non-voting
|
||||||
NON_VOTING = [
|
NON_VOTING = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
TAGS = {
|
||||||
|
'centos-platforms': CENTOS_PLATFORMS,
|
||||||
|
'debian-platforms': DEBIAN_PLATFORMS,
|
||||||
|
'ubuntu-platforms': UBUNTU_PLATFORMS,
|
||||||
|
'all-platforms': ALL_PLATFORMS,
|
||||||
|
}
|
||||||
|
|
||||||
# Insert a job to make that single job non-voting
|
# Insert a job to make that single job non-voting
|
||||||
NON_VOTING_JOBS = [
|
NON_VOTING_JOBS = [
|
||||||
'zuul-jobs-test-multinode-roles-gentoo-17-0-systemd',
|
'zuul-jobs-test-multinode-roles-gentoo-17-0-systemd',
|
||||||
@@ -89,15 +104,14 @@ def handle_file(fn):
|
|||||||
continue
|
continue
|
||||||
outdata.append(obj)
|
outdata.append(obj)
|
||||||
tags = job.get('tags', [])
|
tags = job.get('tags', [])
|
||||||
all_platforms = False
|
platforms = set()
|
||||||
if 'all-platforms-multinode' in tags:
|
multinode = 'multinode' in tags
|
||||||
multinode = True
|
for key, data in TAGS.items():
|
||||||
all_platforms = True
|
if key in tags:
|
||||||
elif 'all-platforms' in tags:
|
platforms.update(data)
|
||||||
all_platforms = True
|
platforms = sorted(platforms)
|
||||||
multinode = False
|
if platforms:
|
||||||
if all_platforms:
|
for platform in platforms:
|
||||||
for platform in PLATFORMS:
|
|
||||||
voting = False if platform in NON_VOTING else True
|
voting = False if platform in NON_VOTING else True
|
||||||
ojob = CommentedMap()
|
ojob = CommentedMap()
|
||||||
ojob['name'] = job['name'] + '-' + platform
|
ojob['name'] = job['name'] + '-' + platform
|
||||||
|
|||||||
@@ -506,7 +506,7 @@
|
|||||||
|
|
||||||
These roles are tested together in this job because they
|
These roles are tested together in this job because they
|
||||||
interact with each other.
|
interact with each other.
|
||||||
tags: all-platforms-multinode
|
tags: all-platforms multinode
|
||||||
abstract: true
|
abstract: true
|
||||||
run: test-playbooks/multinode/multinode.yaml
|
run: test-playbooks/multinode/multinode.yaml
|
||||||
files:
|
files:
|
||||||
|
|||||||
Reference in New Issue
Block a user