From 7e93ad16fbf03e1f9a3d14c9ac79a6616724e391 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 29 Oct 2024 13:09:48 +0100 Subject: [PATCH] Separate S2I and NOS2i tests Signed-off-by: Petr "Stone" Hracek --- .github/workflows/openshift-tests-nos2i.yaml | 36 +++++++++++++++++++ ...ft-tests.yaml => openshift-tests-s2i.yaml} | 8 ++--- 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/openshift-tests-nos2i.yaml rename .github/workflows/{openshift-tests.yaml => openshift-tests-s2i.yaml} (76%) diff --git a/.github/workflows/openshift-tests-nos2i.yaml b/.github/workflows/openshift-tests-nos2i.yaml new file mode 100644 index 0000000..6275a9e --- /dev/null +++ b/.github/workflows/openshift-tests-nos2i.yaml @@ -0,0 +1,36 @@ +on: + issue_comment: + types: + - created +jobs: + openshift-tests: + # This job only runs for '[test]' pull request comments by owner, member + name: "Integration tests for NOS2I Helm charts ${{ matrix.helm_chart }} tested on RHEL-8 OpenShift 4" + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + helm_chart: ["httpd", "mariadb", "mysql", "postgresql", "redis", "valkey" ] + + if: | + github.event.issue.pull_request + && contains((github.event.comment.body, '[test-nos2i]') || (github.event.comment.body, '[test-all]')) + && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + ref: "refs/pull/${{ github.event.issue.number }}/head" + + - name: Schedule tests on external Testing Farm by Testing-Farm-as-github-action + uses: sclorg/testing-farm-as-github-action@main + with: + api_key: ${{ secrets.TF_INTERNAL_API_KEY }} + compose: "RHEL-8.10.0-Nightly" + git_url: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans" + git_ref: "master" + tf_scope: "private" + tmt_plan_regex: "rhel8-openshift-helms" + update_pull_request_status: true + pull_request_status_name: "Helm chart - NOS2I - ${{ matrix.helm_chart }}" + variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.issue.number }};TEST_NAME=test-${{ matrix.helm_chart }}" diff --git a/.github/workflows/openshift-tests.yaml b/.github/workflows/openshift-tests-s2i.yaml similarity index 76% rename from .github/workflows/openshift-tests.yaml rename to .github/workflows/openshift-tests-s2i.yaml index 8cb92b2..c3afb30 100644 --- a/.github/workflows/openshift-tests.yaml +++ b/.github/workflows/openshift-tests-s2i.yaml @@ -5,16 +5,16 @@ on: jobs: openshift-tests: # This job only runs for '[test]' pull request comments by owner, member - name: "Integration tests for Helm charts ${{ matrix.helm_chart }} tested on RHEL-8 OpenShift 4" + name: "Integration tests for S2I Helm charts ${{ matrix.helm_chart }} tested on RHEL-8 OpenShift 4" runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: - helm_chart: ["httpd", "mariadb", "mysql", "nginx", "postgresql", "redis", "php", "perl", "nodejs", "ruby", "python", "valkey" ] + helm_chart: ["nginx", "php", "perl", "nodejs", "ruby", "python" ] if: | github.event.issue.pull_request - && contains(github.event.comment.body, '[test]') + && contains((github.event.comment.body, '[test-s2i]') || (github.event.comment.body, '[test-all]')) && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - name: Checkout repo @@ -32,5 +32,5 @@ jobs: tf_scope: "private" tmt_plan_regex: "rhel8-openshift-helms" update_pull_request_status: true - pull_request_status_name: "Helm chart - ${{ matrix.helm_chart }}" + pull_request_status_name: "Helm chart - S2I - ${{ matrix.helm_chart }}" variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.issue.number }};TEST_NAME=test-${{ matrix.helm_chart }}"