From cac18755757d849ac37f196494d10b63fc9eb53e Mon Sep 17 00:00:00 2001 From: Andre Aranha Date: Tue, 2 Nov 2021 17:55:38 +0000 Subject: [PATCH] Add fips version of jobs needed for OpenStack FIPS needs to be enabled before test-setup is run, as enabling FIPS requires the node to be rebooted, test-setup needs to run and setup the environment after the reboot. Change-Id: I6fecb9c6e917d1a36b2b82c1b02098eed4323ac7 --- doc/source/general-jobs.rst | 1 + doc/source/python-jobs.rst | 1 + zuul.d/general-jobs.yaml | 13 ++++++++++ zuul.d/python-jobs.yaml | 49 +++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) diff --git a/doc/source/general-jobs.rst b/doc/source/general-jobs.rst index 47b67186f..751fb6bff 100644 --- a/doc/source/general-jobs.rst +++ b/doc/source/general-jobs.rst @@ -4,6 +4,7 @@ General Purpose Jobs .. zuul:autojob:: dco-license .. zuul:autojob:: dhall-diff .. zuul:autojob:: unittests +.. zuul:autojob:: unittests-fips .. zuul:autojob:: markdownlint .. zuul:autojob:: multinode .. zuul:autojob:: multinode-fips diff --git a/doc/source/python-jobs.rst b/doc/source/python-jobs.rst index 805d9783b..82dd3faa2 100644 --- a/doc/source/python-jobs.rst +++ b/doc/source/python-jobs.rst @@ -2,6 +2,7 @@ Python Jobs =========== .. zuul:autojob:: tox +.. zuul:autojob:: tox-fips .. zuul:autojob:: tox-py27 .. zuul:autojob:: tox-py36 .. zuul:autojob:: tox-py37 diff --git a/zuul.d/general-jobs.yaml b/zuul.d/general-jobs.yaml index fbc4a6b73..a9d579be1 100644 --- a/zuul.d/general-jobs.yaml +++ b/zuul.d/general-jobs.yaml @@ -17,6 +17,19 @@ pre-run: playbooks/unittests/pre.yaml post-run: playbooks/unittests/post.yaml +- job: + name: unittests-fips + abstract: true + description: | + Enable fips and Perform setup common to all unit test jobs. + + This performs basic host and general project setup tasks common + to all types of unit test jobs related to fips. + pre-run: + - playbooks/enable-fips/pre.yaml + - playbooks/unittests/pre.yaml + post-run: playbooks/unittests/post.yaml + - job: name: multinode abstract: true diff --git a/zuul.d/python-jobs.yaml b/zuul.d/python-jobs.yaml index 46795e54b..cc9a8e897 100644 --- a/zuul.d/python-jobs.yaml +++ b/zuul.d/python-jobs.yaml @@ -47,6 +47,55 @@ NOSE_HTML_OUT_FILE: nose_results.html NOSE_WITH_XUNIT: 1 +- job: + name: tox-fips + parent: unittests-fips + description: | + Base job containing setup and teardown for fips and tox-based test jobs. + + This performs basic host and general project setup tasks common + to all tox unit test jobs related to fips. + + Responds to these variables: + + .. zuul:jobvar:: tox_envlist + + Use the specified tox environments (``ALL`` selects all). + + .. zuul:jobvar:: tox_environment + :type: dict + + Environment variables to pass in to the tox run. + + .. zuul:jobvar:: tox_extra_args + + String containing extra arguments to append to the tox command line. + + .. zuul:jobvar:: tox_constraints_file + + Path to a pip constraints file. Will be provided to tox in the + TOX_CONSTRAINTS_FILE environment variable if it exists. + + .. zuul:jobvar:: tox_install_siblings + :default: true + + Override tox requirements that have corresponding zuul git repos + on the node by installing the git versions into the tox virtualenv. + + .. zuul:jobvar:: tox_install_bindep + :default: true + + Whether or not to run the binary dependencies detection and + installation with bindep. + run: playbooks/tox/run.yaml + pre-run: playbooks/tox/pre.yaml + post-run: playbooks/tox/post.yaml + vars: + tox_environment: + NOSE_WITH_HTML_OUTPUT: 1 + NOSE_HTML_OUT_FILE: nose_results.html + NOSE_WITH_XUNIT: 1 + - job: name: tox-py27 parent: tox