From 87d597343f908a64dbcfa627e8f4fe05bca7cc2e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 8 Jul 2019 07:11:31 -0700 Subject: [PATCH] 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 --- tools/update-test-platforms.py | 37 ++++++++-------- zuul-tests.d/general-roles-jobs.yaml | 64 +++++++++++++++++++--------- zuul-tests.d/jobs.yaml | 2 - zuul-tests.d/js-roles-jobs.yaml | 2 - zuul-tests.d/puppet-roles-jobs.yaml | 2 - 5 files changed, 62 insertions(+), 45 deletions(-) diff --git a/tools/update-test-platforms.py b/tools/update-test-platforms.py index 5d15147ba..560f5ed30 100755 --- a/tools/update-test-platforms.py +++ b/tools/update-test-platforms.py @@ -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 diff --git a/zuul-tests.d/general-roles-jobs.yaml b/zuul-tests.d/general-roles-jobs.yaml index 8a8d6a809..253b9b896 100644 --- a/zuul-tests.d/general-roles-jobs.yaml +++ b/zuul-tests.d/general-roles-jobs.yaml @@ -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 diff --git a/zuul-tests.d/jobs.yaml b/zuul-tests.d/jobs.yaml index c37569b35..0bbe0a6b7 100644 --- a/zuul-tests.d/jobs.yaml +++ b/zuul-tests.d/jobs.yaml @@ -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 diff --git a/zuul-tests.d/js-roles-jobs.yaml b/zuul-tests.d/js-roles-jobs.yaml index a6f80955f..5859bc90e 100644 --- a/zuul-tests.d/js-roles-jobs.yaml +++ b/zuul-tests.d/js-roles-jobs.yaml @@ -7,8 +7,6 @@ vars: role_name: install-nodejs -# List all the jobs in this file. - - project: check: jobs: &id001 diff --git a/zuul-tests.d/puppet-roles-jobs.yaml b/zuul-tests.d/puppet-roles-jobs.yaml index 4724b33b9..a11e330ee 100644 --- a/zuul-tests.d/puppet-roles-jobs.yaml +++ b/zuul-tests.d/puppet-roles-jobs.yaml @@ -7,8 +7,6 @@ vars: role_name: install-pdk-dependencies -# List all the jobs in this file. - - project: check: jobs: &id001