From 860d253b92adb90f6e05c545c1767fa7ea82ab10 Mon Sep 17 00:00:00 2001 From: "Xu Han@AutoMQ" Date: Fri, 16 Aug 2024 14:36:19 +0800 Subject: [PATCH] chore(workflows): e2e support release runner (#1826) chore(workflows): e2e support release runner (#1825) Signed-off-by: Robin Han --- .github/workflows/e2e-run.yml | 1 + .github/workflows/nightly-extra-e2e.yml | 21 +++++++++++++++------ .github/workflows/nightly-main-e2e.yml | 23 ++++++++++++++++------- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/e2e-run.yml b/.github/workflows/e2e-run.yml index 58d13a37d9..3bd0e70a7c 100644 --- a/.github/workflows/e2e-run.yml +++ b/.github/workflows/e2e-run.yml @@ -48,6 +48,7 @@ jobs: - name: Move results run: | results_path="$(pwd)/results/$(readlink results/latest | cut -d'/' -f5)" + mkdir -p "${{ inputs.storage-path }}/${{ inputs.suite-id }}" mv "${results_path}" "${{ inputs.storage-path }}/${{ inputs.suite-id }}" if: ${{ always() }} shell: bash diff --git a/.github/workflows/nightly-extra-e2e.yml b/.github/workflows/nightly-extra-e2e.yml index 86ccbf5fc4..2be41b21fd 100644 --- a/.github/workflows/nightly-extra-e2e.yml +++ b/.github/workflows/nightly-extra-e2e.yml @@ -1,6 +1,15 @@ name: Nightly Extra E2E tests on: workflow_dispatch: + inputs: + runs_on: + description: 'Runs on' + required: false + default: extra-release + type: choice + options: + - extra + - extra-release schedule: - cron: '0 16 * * *' @@ -13,7 +22,7 @@ jobs: suite-id: "benchmarks" test-path: "tests/kafkatest/benchmarks" storage-path: "/data/github-actions/reports" - runner: "extra" + runner: ${{ inputs.runs_on || 'extra' }} connect_e2e_1: name: "Run connect E2E Tests 1" uses: ./.github/workflows/e2e-run.yml @@ -22,7 +31,7 @@ jobs: suite-id: "connect1" test-yaml: "tests/suites/connect_test_suite1.yml" storage-path: "/data/github-actions/reports" - runner: "extra" + runner: ${{ inputs.runs_on || 'extra' }} connect_e2e_2: name: "Run connect E2E Tests 2" uses: ./.github/workflows/e2e-run.yml @@ -31,7 +40,7 @@ jobs: suite-id: "connect2" test-yaml: "tests/suites/connect_test_suite2.yml" storage-path: "/data/github-actions/reports" - runner: "extra" + runner: ${{ inputs.runs_on || 'extra' }} connect_e2e_3: name: "Run connect E2E Tests 3" uses: ./.github/workflows/e2e-run.yml @@ -40,7 +49,7 @@ jobs: suite-id: "connect3" test-yaml: "tests/suites/connect_test_suite3.yml" storage-path: "/data/github-actions/reports" - runner: "extra" + runner: ${{ inputs.runs_on || 'extra' }} streams_e2e: name: "Run streams E2E Tests" uses: ./.github/workflows/e2e-run.yml @@ -49,10 +58,10 @@ jobs: suite-id: "streams" test-path: "tests/kafkatest/tests/streams" storage-path: "/data/github-actions/reports" - runner: "extra" + runner: ${{ inputs.runs_on || 'extra' }} e2e_summary: name: "E2E Tests Summary" - runs-on: [ self-hosted, extra ] + runs-on: ${{ inputs.runs_on || 'extra' }} if: ${{ always() && github.repository_owner == 'AutoMQ' }} needs: [ benchmarks_e2e, connect_e2e_1, connect_e2e_2, connect_e2e_3, streams_e2e ] steps: diff --git a/.github/workflows/nightly-main-e2e.yml b/.github/workflows/nightly-main-e2e.yml index 936ca1929b..40557c5821 100644 --- a/.github/workflows/nightly-main-e2e.yml +++ b/.github/workflows/nightly-main-e2e.yml @@ -1,6 +1,15 @@ name: Nightly Main E2E tests on: workflow_dispatch: + inputs: + runs_on: + description: 'Runs on' + required: false + default: main-release + type: choice + options: + - main + - main-release schedule: - cron: '0 16 * * *' @@ -13,7 +22,7 @@ jobs: suite-id: "main1" test-yaml: "tests/suites/main_kos_test_suite1.yml" storage-path: "/data/github-actions/reports" - runner: "main" + runner: ${{ inputs.runs_on || 'main' }} main_e2e_2: name: "Run Main E2E Tests 2" uses: ./.github/workflows/e2e-run.yml @@ -22,7 +31,7 @@ jobs: suite-id: "main2" test-yaml: "tests/suites/main_kos_test_suite2.yml" storage-path: "/data/github-actions/reports" - runner: "main" + runner: ${{ inputs.runs_on || 'main' }} main_e2e_3: name: "Run Main E2E Tests 3" uses: ./.github/workflows/e2e-run.yml @@ -31,7 +40,7 @@ jobs: suite-id: "main3" test-yaml: "tests/suites/main_kos_test_suite3.yml" storage-path: "/data/github-actions/reports" - runner: "main" + runner: ${{ inputs.runs_on || 'main' }} main_e2e_4: name: "Run Main E2E Tests 4" uses: ./.github/workflows/e2e-run.yml @@ -40,7 +49,7 @@ jobs: suite-id: "main4" test-yaml: "tests/suites/main_kos_test_suite4.yml" storage-path: "/data/github-actions/reports" - runner: "main" + runner: ${{ inputs.runs_on || 'main' }} main_e2e_5: name: "Run Main E2E Tests 5" uses: ./.github/workflows/e2e-run.yml @@ -49,7 +58,7 @@ jobs: suite-id: "main5" test-yaml: "tests/suites/main_kos_test_suite5.yml" storage-path: "/data/github-actions/reports" - runner: "main" + runner: ${{ inputs.runs_on || 'main' }} main_e2e_6: name: "Run Main E2E Tests 6" uses: ./.github/workflows/e2e-run.yml @@ -58,10 +67,10 @@ jobs: suite-id: "main6" test-yaml: "tests/suites/main_kos_test_suite6.yml" storage-path: "/data/github-actions/reports" - runner: "main" + runner: ${{ inputs.runs_on || 'main' }} e2e_summary: + runs-on: ${{ inputs.runs_on || 'main' }} name: "E2E Tests Summary" - runs-on: [ self-hosted, main ] if: ${{ always() && github.repository_owner == 'AutoMQ' }} needs: [ main_e2e_1, main_e2e_2, main_e2e_3, main_e2e_4, main_e2e_5, main_e2e_6 ] steps: