Don't use -latest nodesets in integration jobs

The single-node base role integration jobs use fedora-latest and
debian-latest nodesets, but because the multinode jobs must define
their own nodesets, that isn't really saving us any effort.  Instead,
since we have a script to generate these anyway, let's just use
the real label names for both jobs.

Change-Id: I48972366af1943168ba0b0d5a4b89cade5361e47
This commit is contained in:
James E. Blair 2019-07-08 07:11:31 -07:00
parent 4a76106743
commit 87d597343f
5 changed files with 62 additions and 45 deletions

View File

@ -25,10 +25,13 @@ from ruamel.yaml.comments import CommentedMap
import ruamellib
# There are fedora- and debian-latest nodesets, but they can't be used
# in the multinode jobs, so just use the real labels everywhere.
PLATFORMS = [
'centos-7',
'debian-stable',
'fedora-latest',
'debian-stretch',
'fedora-29',
'opensuse-15',
'opensuse-tumbleweed',
'ubuntu-bionic',
@ -38,24 +41,20 @@ PLATFORMS = [
def get_nodeset(platform, multinode):
if not multinode:
return platform
d = CommentedMap()
# There are nodesets for fedora-latest and debian-stable
# but no labels, and there are no nodesets for fedora-29
# and debian-stretch. So, map between these.
if platform == 'fedora-latest':
platform = 'fedora-29'
elif platform == 'debian-stable':
platform = 'debian-stretch'
d['nodes'] = [
CommentedMap([('name', 'primary'), ('label', platform)]),
CommentedMap([('name', 'secondary'), ('label', platform)]),
]
d['groups'] = [
CommentedMap([('name', 'switch'), ('nodes', ['primary'])]),
CommentedMap([('name', 'peers'), ('nodes', ['secondary'])]),
]
if not multinode:
d['nodes'] = [
CommentedMap([('name', platform), ('label', platform)]),
]
else:
d['nodes'] = [
CommentedMap([('name', 'primary'), ('label', platform)]),
CommentedMap([('name', 'secondary'), ('label', platform)]),
]
d['groups'] = [
CommentedMap([('name', 'switch'), ('nodes', ['primary'])]),
CommentedMap([('name', 'peers'), ('nodes', ['secondary'])]),
]
return d

View File

@ -32,56 +32,80 @@
description: Tests roles in the 'base' job on centos-7
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: centos-7
nodeset:
nodes:
- name: centos-7
label: centos-7
- job:
name: zuul-jobs-test-base-roles-debian-stable
description: Tests roles in the 'base' job on debian-stable
name: zuul-jobs-test-base-roles-debian-stretch
description: Tests roles in the 'base' job on debian-stretch
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: debian-stable
nodeset:
nodes:
- name: debian-stretch
label: debian-stretch
- job:
name: zuul-jobs-test-base-roles-fedora-latest
description: Tests roles in the 'base' job on fedora-latest
name: zuul-jobs-test-base-roles-fedora-29
description: Tests roles in the 'base' job on fedora-29
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: fedora-latest
nodeset:
nodes:
- name: fedora-29
label: fedora-29
- job:
name: zuul-jobs-test-base-roles-opensuse-15
description: Tests roles in the 'base' job on opensuse-15
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: opensuse-15
nodeset:
nodes:
- name: opensuse-15
label: opensuse-15
- job:
name: zuul-jobs-test-base-roles-opensuse-tumbleweed
description: Tests roles in the 'base' job on opensuse-tumbleweed
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: opensuse-tumbleweed
nodeset:
nodes:
- name: opensuse-tumbleweed
label: opensuse-tumbleweed
- job:
name: zuul-jobs-test-base-roles-ubuntu-bionic
description: Tests roles in the 'base' job on ubuntu-bionic
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: ubuntu-bionic
nodeset:
nodes:
- name: ubuntu-bionic
label: ubuntu-bionic
- job:
name: zuul-jobs-test-base-roles-ubuntu-trusty
description: Tests roles in the 'base' job on ubuntu-trusty
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: ubuntu-trusty
nodeset:
nodes:
- name: ubuntu-trusty
label: ubuntu-trusty
- job:
name: zuul-jobs-test-base-roles-ubuntu-xenial
description: Tests roles in the 'base' job on ubuntu-xenial
parent: zuul-jobs-test-base-roles
tags: auto-generated
nodeset: ubuntu-xenial
nodeset:
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial
- job:
name: zuul-jobs-test-multinode-roles
@ -121,8 +145,8 @@
- secondary
- job:
name: zuul-jobs-test-multinode-roles-debian-stable
description: Tests multinode setup roles on debian-stable
name: zuul-jobs-test-multinode-roles-debian-stretch
description: Tests multinode setup roles on debian-stretch
parent: zuul-jobs-test-multinode-roles
tags: auto-generated
nodeset:
@ -140,8 +164,8 @@
- secondary
- job:
name: zuul-jobs-test-multinode-roles-fedora-latest
description: Tests multinode setup roles on fedora-latest
name: zuul-jobs-test-multinode-roles-fedora-29
description: Tests multinode setup roles on fedora-29
parent: zuul-jobs-test-multinode-roles
tags: auto-generated
nodeset:
@ -265,16 +289,16 @@
check:
jobs: &id001
- zuul-jobs-test-base-roles-centos-7
- zuul-jobs-test-base-roles-debian-stable
- zuul-jobs-test-base-roles-fedora-latest
- zuul-jobs-test-base-roles-debian-stretch
- zuul-jobs-test-base-roles-fedora-29
- zuul-jobs-test-base-roles-opensuse-15
- zuul-jobs-test-base-roles-opensuse-tumbleweed
- zuul-jobs-test-base-roles-ubuntu-bionic
- zuul-jobs-test-base-roles-ubuntu-trusty
- zuul-jobs-test-base-roles-ubuntu-xenial
- zuul-jobs-test-multinode-roles-centos-7
- zuul-jobs-test-multinode-roles-debian-stable
- zuul-jobs-test-multinode-roles-fedora-latest
- zuul-jobs-test-multinode-roles-debian-stretch
- zuul-jobs-test-multinode-roles-fedora-29
- zuul-jobs-test-multinode-roles-opensuse-15
- zuul-jobs-test-multinode-roles-opensuse-tumbleweed
- zuul-jobs-test-multinode-roles-ubuntu-bionic

View File

@ -10,8 +10,6 @@
tox_environment:
ANSIBLE_ROLES_PATH: ~/src/opendev.org/opendev/base-jobs/roles:~/src/opendev.org/zuul/zuul-jobs/roles
# List all the jobs in this file.
- project:
check:
jobs: &id001

View File

@ -7,8 +7,6 @@
vars:
role_name: install-nodejs
# List all the jobs in this file.
- project:
check:
jobs: &id001

View File

@ -7,8 +7,6 @@
vars:
role_name: install-pdk-dependencies
# List all the jobs in this file.
- project:
check:
jobs: &id001