From 819403b86e8ad86184b02d138bbc1fa28f0b7922 Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Thu, 27 Nov 2025 14:29:31 +0100 Subject: [PATCH 1/2] Tests use reusable workflows from ci-actions --- .github/workflows/container-pytests.yml | 77 ------------------------ .github/workflows/container-tests.yml | 78 ++++--------------------- .github/workflows/openshift-pytest.yml | 56 ------------------ .github/workflows/openshift-tests.yml | 68 --------------------- 4 files changed, 10 insertions(+), 269 deletions(-) delete mode 100644 .github/workflows/container-pytests.yml delete mode 100644 .github/workflows/openshift-pytest.yml delete mode 100644 .github/workflows/openshift-tests.yml diff --git a/.github/workflows/container-pytests.yml b/.github/workflows/container-pytests.yml deleted file mode 100644 index a8e426df..00000000 --- a/.github/workflows/container-pytests.yml +++ /dev/null @@ -1,77 +0,0 @@ ---- - -on: - issue_comment: - types: - - created -jobs: - distgen-check: - name: "Check distgen generated files" - runs-on: ubuntu-latest - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-pytest]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - name: Checkout repo - uses: actions/checkout@v5 - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - submodules: true - - - name: Check distgen generated files - id: check - shell: bash - run: | - sha=$(git rev-parse HEAD) - sudo apt update && sudo apt -y install python3-pip - pip3 install pyyaml distgen Jinja2 - result="success" - ./common/tests/check_distgen_generated_files.sh || result="failure" - echo "result=$result" >> "$GITHUB_OUTPUT" - echo "sha=$sha" >> "$GITHUB_OUTPUT" - - - name: Set final commit status - uses: myrotvorets/set-commit-status-action@v2.0.0 - with: - status: ${{ steps.check.outputs.result }} - context: "Distgen check" - sha: ${{ steps.check.outputs.sha }} - - - name: Exit on ERR - shell: bash - run: | - _result=${{ steps.check.outputs.result }} - if [ "$_result" == failure ]; then - echo "Distgen-generated files are not regenerated properly." - echo "Please regenerate them with:" - echo "'make clean-versions'" - echo "'make generate-all'" - exit 1 - fi - - container-tests: - needs: distgen-check - name: "Container PyTest: ${{ matrix.version }} - ${{ matrix.os_test }}" - runs-on: ubuntu-latest - concurrency: - group: container-pytest-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} - cancel-in-progress: true - strategy: - fail-fast: false - matrix: - version: [ "3.9", "3.9-minimal", "3.11", "3.11-minimal", "3.12", "3.12-minimal", "3.13" ] - os_test: [ "fedora", "rhel8", "rhel9", "rhel10", "c9s", "c10s" ] - test_case: [ "container-pytest" ] - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-pytest]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - uses: sclorg/tfaga-wrapper@main - with: - os_test: ${{ matrix.os_test }} - version: ${{ matrix.version }} - test_case: ${{ matrix.test_case }} - public_api_key: ${{ secrets.TF_PUBLIC_API_KEY }} - private_api_key: ${{ secrets.TF_INTERNAL_API_KEY }} diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index 679bac57..cfa8ec1a 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -6,72 +6,14 @@ on: - created jobs: distgen-check: - name: "Check distgen generated files" - runs-on: ubuntu-latest - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - name: Checkout repo - uses: actions/checkout@v5 - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - submodules: true - - - name: Check distgen generated files - id: check - shell: bash - run: | - sha=$(git rev-parse HEAD) - sudo apt update && sudo apt -y install python3-pip - pip3 install pyyaml distgen Jinja2 - result="success" - ./common/tests/check_distgen_generated_files.sh || result="failure" - echo "result=$result" >> "$GITHUB_OUTPUT" - echo "sha=$sha" >> "$GITHUB_OUTPUT" - - - name: Set final commit status - uses: myrotvorets/set-commit-status-action@v2.0.0 - with: - status: ${{ steps.check.outputs.result }} - context: "Distgen check" - sha: ${{ steps.check.outputs.sha }} - - - name: Exit on ERR - shell: bash - run: | - _result=${{ steps.check.outputs.result }} - if [ "$_result" == failure ]; then - echo "Distgen-generated files are not regenerated properly." - echo "Please regenerate them with:" - echo "'make clean-versions'" - echo "'make generate-all'" - exit 1 - fi - + uses: "sclorg/ci-actions/.github/workflows/distgen-check.yml@main" + check-readme: + uses: "sclorg/ci-actions/.github/workflows/check-readme.yml@main" container-tests: - needs: distgen-check - name: "Container tests: ${{ matrix.version }} - ${{ matrix.os_test }}" - runs-on: ubuntu-latest - concurrency: - group: container-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} - cancel-in-progress: true - strategy: - fail-fast: false - matrix: - version: [ "3.9", "3.9-minimal", "3.11", "3.11-minimal", "3.12", "3.12-minimal", "3.13", "3.13-minimal" ] - os_test: [ "fedora", "rhel8", "rhel9", "rhel10", "c9s", "c10s" ] - test_case: [ "container" ] - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - uses: sclorg/tfaga-wrapper@main - with: - os_test: ${{ matrix.os_test }} - version: ${{ matrix.version }} - test_case: ${{ matrix.test_case }} - public_api_key: ${{ secrets.TF_PUBLIC_API_KEY }} - private_api_key: ${{ secrets.TF_INTERNAL_API_KEY }} + needs: check-readme + uses: "sclorg/ci-actions/.github/workflows/container-tests.yml@main" + with: + enabled-tests: '["container","container-pytest","openshift-4","openshift-pytest"]' + versions: '[ "3.9", "3.9-minimal", "3.11", "3.11-minimal", "3.12", "3.12-minimal", "3.13", "3.13-minimal" ]' + openshift-versions: '[ "3.8", "3.9", "3.11", "3.12", "3.12-minimal" ]' + secrets: inherit diff --git a/.github/workflows/openshift-pytest.yml b/.github/workflows/openshift-pytest.yml deleted file mode 100644 index 5b5e5e52..00000000 --- a/.github/workflows/openshift-pytest.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- - -on: - issue_comment: - types: - - created -jobs: - distgen-check: - name: "Check distgen generated files" - runs-on: ubuntu-latest - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift-pytest]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - name: Checkout repo - uses: actions/checkout@v5 - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - submodules: true - - - name: Check distgen generated files - id: check - shell: bash - run: | - sudo apt update && sudo apt -y install python3-pip - pip3 install pyyaml distgen Jinja2 - result="success" - ./common/tests/check_distgen_generated_files.sh - - openshift-pytests: - needs: distgen-check - name: "${{ matrix.test_case }} PyTests: ${{ matrix.version }} - ${{ matrix.os_test }}" - runs-on: ubuntu-latest - concurrency: - group: ocp-pytest-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} - cancel-in-progress: true - strategy: - fail-fast: false - matrix: - version: [ "3.8", "3.9", "3.11", "3.12", "3.12-minimal" ] - os_test: [ "rhel8", "rhel9", "rhel10" ] - test_case: [ "openshift-pytest" ] - - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift-pytest]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - uses: sclorg/tfaga-wrapper@main - with: - os_test: ${{ matrix.os_test }} - version: ${{ matrix.version }} - test_case: ${{ matrix.test_case }} - public_api_key: ${{ secrets.TF_PUBLIC_API_KEY }} - private_api_key: ${{ secrets.TF_INTERNAL_API_KEY }} diff --git a/.github/workflows/openshift-tests.yml b/.github/workflows/openshift-tests.yml deleted file mode 100644 index 26658c76..00000000 --- a/.github/workflows/openshift-tests.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- - -on: - issue_comment: - types: - - created -jobs: - check-imagestreams: - runs-on: ubuntu-latest - permissions: - contents: read - statuses: write - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - uses: sclorg/ci-scripts/ocp-stream-generator@master - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - - distgen-check: - name: "Check distgen generated files" - runs-on: ubuntu-latest - needs: check-imagestreams - steps: - - name: Checkout repo - uses: actions/checkout@v5 - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - submodules: true - - - name: Check distgen generated files - id: check - shell: bash - run: | - sudo apt update && sudo apt -y install python3-pip - pip3 install pyyaml distgen Jinja2 - result="success" - ./common/tests/check_distgen_generated_files.sh - - openshift-tests: - needs: distgen-check - name: "${{ matrix.test_case }} tests: ${{ matrix.version }} - ${{ matrix.os_test }}" - runs-on: ubuntu-latest - concurrency: - group: ocp-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} - cancel-in-progress: true - strategy: - fail-fast: false - matrix: - version: [ "3.8", "3.9", "3.11", "3.12", "3.12-minimal" ] - os_test: [ "rhel8", "rhel9", "rhel10" ] - test_case: [ "openshift-4" ] - - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) - steps: - - uses: sclorg/tfaga-wrapper@main - with: - os_test: ${{ matrix.os_test }} - version: ${{ matrix.version }} - test_case: ${{ matrix.test_case }} - public_api_key: ${{ secrets.TF_PUBLIC_API_KEY }} - private_api_key: ${{ secrets.TF_INTERNAL_API_KEY }} -... From d72ed4d9060aed4d64f1c90370d6905c325a1355 Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Thu, 27 Nov 2025 14:29:41 +0100 Subject: [PATCH 2/2] Add version table in main README.md --- README.md | 57 ++++++++++++++++++------------------------------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 397a9186..30b06157 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,6 @@ Python container images ======================= [![Build and push container images to Quay.io registry](https://github.com/sclorg/s2i-python-container/actions/workflows/build-and-push.yml/badge.svg)](https://github.com/sclorg/s2i-python-container/actions/workflows/build-and-push.yml) -Images available on Quay are: -* RHEL 8 [python-39-minimal-el8](https://quay.io/repository/sclorg/python-39-minimal-el8) -* RHEL 8 [python-311-minimal-el8](https://quay.io/repository/sclorg/python-311-minimal-el8) -* RHEL 8 [python-312-minimal-el8](https://quay.io/repository/sclorg/python-312-minimal-el8) -* CentOS Stream 9 minimal [python-39-minimal-c9s](https://quay.io/repository/sclorg/python-39-minimal-c9s) -* CentOS Stream 9 [python-39-c9s](https://quay.io/repository/sclorg/python-39-c9s) -* CentOS Stream 9 minimal [python-311-minimal-c9s](https://quay.io/repository/sclorg/python-311-minimal-c9s) -* CentOS Stream 9 [python-311-c9s](https://quay.io/repository/sclorg/python-311-c9s) -* CentOS Stream 9 [python-312-minimal-c9s](https://quay.io/repository/sclorg/python-312-minimal-c9s) -* CentOS Stream 9 [python-312-c9s](https://quay.io/repository/sclorg/python-312-c9s) -* CentOS Stream 10 [python-312-minimal-c10s](https://quay.io/repository/sclorg/python-312-minimal-c10s) -* CentOS Stream 10 [python-312-c10s](https://quay.io/repository/sclorg/python-312-c10s) -* CentOS Stream 10 [python-313-minimal-c10s](https://quay.io/repository/sclorg/python-313-minimal-c10s) -* CentOS Stream 10 [python-313-c10s](https://quay.io/repository/sclorg/python-313-c10s) -* Fedora [python-313](https://quay.io/repository/fedora/python-313) -* Fedora [python-313-minimal](https://quay.io/repository/fedora/python-313-minimal) - This repository contains the source for building various versions of the Python application as a reproducible container image using [source-to-image](https://github.com/openshift/source-to-image). @@ -54,28 +37,24 @@ For more information about contributing, see Versions --------------- -Python versions currently provided are: -* [python-3.6](3.6) -* [python-3.9](3.9) -* [python-3.9 Minimal (tech-preview)](3.9-minimal) -* [python-3.11](3.11) -* [python-3.11 Minimal (tech-preview)](3.11-minimal) -* [python-3.12](3.12) -* [python-3.12 Minimal (tech-preview)](3.12-minimal) -* [python-3.13](3.13) -* [python-3.13 Minimal (tech-preview)](3.13-minimal) - -RHEL versions currently supported are: -* RHEL 8 ([catalog.redhat.com](https://catalog.redhat.com/software/containers/search)) -* RHEL 9 ([catalog.redhat.com](https://catalog.redhat.com/software/containers/search)) -* RHEL 10 ([catalog.redhat.com](https://catalog.redhat.com/software/containers/search)) - -CentOS Stream versions currently supported are: -* CentOS Stream 9 ([quay.io/sclorg](https://quay.io/organization/sclorg)) -* CentOS Stream 10 ([quay.io/sclorg](https://quay.io/organization/sclorg)) - -Fedora versions currently supported are: -* Fedora 42 ([quay.io/fedora](https://quay.io/organization/fedora)) +Currently supported versions are visible in the following table, expand an entry to see its container registry address. + +||CentOS Stream 9|CentOS Stream 10|Fedora|RHEL 8|RHEL 9|RHEL 10| +|:--|:--:|:--:|:--:|:--:|:--:|:--:| +|3.6||||
`registry.redhat.io/rhel8/python-36`
||| +|3.9|
`quay.io/sclorg/python-39-c9s`
|||
`registry.redhat.io/rhel8/python-39`
|
`registry.redhat.io/rhel9/python-39`
|| +|3.9-minimal|
`quay.io/sclorg/python-39-minimal-c9s`
|||
`registry.redhat.io/rhel8/python-39-minimal`
||| +|3.11|
`quay.io/sclorg/python-311-c9s`
|||
`registry.redhat.io/rhel8/python-311`
|
`registry.redhat.io/rhel9/python-311`
|| +|3.11-minimal|
`quay.io/sclorg/python-311-minimal-c9s`
|||
`registry.redhat.io/rhel8/python-311-minimal`
||| +|3.12|
`quay.io/sclorg/python-312-c9s`
|
`quay.io/sclorg/python-312-c10s`
||
`registry.redhat.io/rhel8/python-312`
|
`registry.redhat.io/rhel9/python-312`
|| +|3.12-minimal|
`quay.io/sclorg/python-312-minimal-c9s`
|
`quay.io/sclorg/python-312-minimal-c10s`
||
`registry.redhat.io/rhel8/python-312-minimal`
|
`registry.redhat.io/rhel9/python-312-minimal`
|
`registry.redhat.io/rhel10/python-312-minimal`
| +|3.13||
`quay.io/sclorg/python-313-c10s`
|
`quay.io/fedora/python-313`
|||| +|3.13-minimal||
`quay.io/sclorg/python-313-minimal-c10s`
|
`quay.io/fedora/python-313-minimal`
|||| + Download --------