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 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 = [ PLATFORMS = [
'centos-7', 'centos-7',
'debian-stable', 'debian-stretch',
'fedora-latest', 'fedora-29',
'opensuse-15', 'opensuse-15',
'opensuse-tumbleweed', 'opensuse-tumbleweed',
'ubuntu-bionic', 'ubuntu-bionic',
@ -38,24 +41,20 @@ PLATFORMS = [
def get_nodeset(platform, multinode): def get_nodeset(platform, multinode):
if not multinode:
return platform
d = CommentedMap() d = CommentedMap()
# There are nodesets for fedora-latest and debian-stable if not multinode:
# but no labels, and there are no nodesets for fedora-29 d['nodes'] = [
# and debian-stretch. So, map between these. CommentedMap([('name', platform), ('label', platform)]),
if platform == 'fedora-latest': ]
platform = 'fedora-29' else:
elif platform == 'debian-stable': d['nodes'] = [
platform = 'debian-stretch' CommentedMap([('name', 'primary'), ('label', platform)]),
d['nodes'] = [ CommentedMap([('name', 'secondary'), ('label', platform)]),
CommentedMap([('name', 'primary'), ('label', platform)]), ]
CommentedMap([('name', 'secondary'), ('label', platform)]), d['groups'] = [
] CommentedMap([('name', 'switch'), ('nodes', ['primary'])]),
d['groups'] = [ CommentedMap([('name', 'peers'), ('nodes', ['secondary'])]),
CommentedMap([('name', 'switch'), ('nodes', ['primary'])]), ]
CommentedMap([('name', 'peers'), ('nodes', ['secondary'])]),
]
return d return d

View File

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

View File

@ -10,8 +10,6 @@
tox_environment: tox_environment:
ANSIBLE_ROLES_PATH: ~/src/opendev.org/opendev/base-jobs/roles:~/src/opendev.org/zuul/zuul-jobs/roles 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: - project:
check: check:
jobs: &id001 jobs: &id001

View File

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

View File

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