From 94b11f07d6c625128e76446999a0dde6e9e81871 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Mon, 17 Feb 2025 10:54:26 +0100 Subject: [PATCH 1/2] Add support for RHEL10 in test-openshift.yaml files Bump version to 1.5.11 Signed-off-by: Petr "Stone" Hracek --- .github/workflows/build-and-push.yml | 2 +- container_workflow_tool/git_operations.py | 10 ++++------ setup.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 73af180..e5d03a2 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -20,7 +20,7 @@ jobs: with: dockerfiles: ./Dockerfile.generator image: cwt-generator - tags: latest 1 ${{ github.sha }} 1.5.10 + tags: latest 1 ${{ github.sha }} 1.5.11 - name: Push cwt-generator image to Quay.io id: push-to-quay diff --git a/container_workflow_tool/git_operations.py b/container_workflow_tool/git_operations.py index a643c25..7542bd1 100644 --- a/container_workflow_tool/git_operations.py +++ b/container_workflow_tool/git_operations.py @@ -194,13 +194,11 @@ def update_test_openshift_yaml(self, test_openshift_yaml, version: str = "", sho with open(test_openshift_yaml) as f: fdata = f.read() fdata = self.update_variable_in_string(fdata, "VERSION", "VERSION_NUMBER", version) - os_name = "fedora" - if self.conf.image_names == "RHEL8": - os_name = "rhel8" - elif self.conf.image_names == "RHEL9": + os_name = "rhel8" + if self.conf.image_names == "RHEL9": os_name = "rhel9" - elif self.conf.image_names == "RHSCL": - os_name = "rhel7" + elif self.conf.image_names == "RHEL10": + os_name = "rhel10" fdata = self.update_variable_in_string(fdata, tag="OS", tag_str="OS_NUMBER", variable=os_name) fdata = self.update_variable_in_string(fdata, tag="SHORT_NAME", tag_str="CONTAINER_NAME", variable=short_name) with open(test_openshift_yaml, 'w') as f: diff --git a/setup.py b/setup.py index 4c5be62..b534e9b 100755 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ def get_dir(system_path=None, virtual_path=None): setup( name='container-workflow-tool', - version="1.5.10", + version="1.5.11", description='A python3 tool to make rebuilding images easier by automating several steps of the process.', long_description=long_description, long_description_content_type='text/markdown', From cdbf1632fe0909e787c8eefdf394df722b69a07a Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Mon, 17 Feb 2025 11:50:58 +0100 Subject: [PATCH 2/2] Fix test suite Signed-off-by: Petr "Stone" Hracek --- tests/test_git_operations.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_git_operations.py b/tests/test_git_operations.py index d34d466..54d77d8 100644 --- a/tests/test_git_operations.py +++ b/tests/test_git_operations.py @@ -53,11 +53,9 @@ def test_distgit_commit_msg(self): @pytest.mark.parametrize( "os_name,os_name_expected,version", [ - ("fedora", "fedora", "base"), ("RHEL8", "rhel8", "1.14"), ("RHEL9", "rhel9", "1.14"), - ("RHSCL", "rhel7", "14"), - ("FOO", "fedora", "bar") + ("RHEL10", "rhel10", "1.14"), ] ) def test_update_openshift_yaml(self, os_name, os_name_expected, version):