From 1982e91e398636e24a692a5c6a7e7a7c828d83db Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Thu, 5 Dec 2024 11:39:04 -0800 Subject: [PATCH] Refactors to use dotenv-action envs for min/max GW API versions Signed-off-by: Daneyon Hansen --- .github/workflows/.env/pr-tests/max_versions.env | 1 + .github/workflows/.env/pr-tests/min_versions.env | 1 + .../kube-gateway-api-conformance-tests/action.yaml | 6 +++--- .github/workflows/conformance-tests.yaml | 14 ++++++-------- .../issue_10359.yaml | 0 5 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/.env/pr-tests/max_versions.env create mode 100644 .github/workflows/.env/pr-tests/min_versions.env rename changelog/{v1.18.0-rc2 => v1.19.0-beta1}/issue_10359.yaml (100%) diff --git a/.github/workflows/.env/pr-tests/max_versions.env b/.github/workflows/.env/pr-tests/max_versions.env new file mode 100644 index 00000000000..542bab5c3a6 --- /dev/null +++ b/.github/workflows/.env/pr-tests/max_versions.env @@ -0,0 +1 @@ +k8sgateway_api_version='v1.2.0' diff --git a/.github/workflows/.env/pr-tests/min_versions.env b/.github/workflows/.env/pr-tests/min_versions.env new file mode 100644 index 00000000000..5171f5a7d38 --- /dev/null +++ b/.github/workflows/.env/pr-tests/min_versions.env @@ -0,0 +1 @@ +k8sgateway_api_version='v1.1.0' diff --git a/.github/workflows/composite-actions/kube-gateway-api-conformance-tests/action.yaml b/.github/workflows/composite-actions/kube-gateway-api-conformance-tests/action.yaml index aacf2aa3172..a892803886c 100644 --- a/.github/workflows/composite-actions/kube-gateway-api-conformance-tests/action.yaml +++ b/.github/workflows/composite-actions/kube-gateway-api-conformance-tests/action.yaml @@ -1,8 +1,8 @@ name: Conformance Tests description: Run Kubernetes Gateway API conformance tests for multiple versions inputs: - gateway-api-version: - description: "The version of Gateway API to test." + k8sgateway-api-version: + description: The version of the Kubernetes Gateway API CRDs to use for testing required: true runs: using: "composite" @@ -58,7 +58,7 @@ runs: - name: Run the kubernetes gateway API conformance tests shell: bash env: - GATEWAY_API_VERSION: ${{ inputs.gateway-api-version }} + GATEWAY_API_VERSION: ${{ inputs.k8sgateway-api-version }} run: make conformance - name: Capture debug information when tests fail if: ${{ failure() }} diff --git a/.github/workflows/conformance-tests.yaml b/.github/workflows/conformance-tests.yaml index dfa3fdc979e..7f91e3203c9 100644 --- a/.github/workflows/conformance-tests.yaml +++ b/.github/workflows/conformance-tests.yaml @@ -18,11 +18,9 @@ on: jobs: run-conformance-tests: - name: Conformance Tests for ${{ matrix.gateway-api-version }} runs-on: ubuntu-latest strategy: matrix: - gateway-api-version: [v1.1.0, v1.2.0] # TODO(tim): Avoid hardcoding versions here. It's a bit tricky based on # how this was setup and there's a limited # of dispatch inputs that GH # supports. We can revisit this later. @@ -35,18 +33,18 @@ jobs: - ${{ inputs.image-variant }} version: - ${{ inputs.version }} + k8sgateway_api_version: + - label: 'min' + file: './.github/workflows/.env/pr-tests/min_versions.env' + - label: 'max' + file: './.github/workflows/.env/pr-tests/max_versions.env' steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Export GATEWAY_API_VERSION - shell: bash - run: echo "GATEWAY_API_VERSION=${{ matrix.gateway-api-version }}" >> $GITHUB_ENV - - name: Run Conformance Tests uses: ./.github/workflows/composite-actions/kube-gateway-api-conformance-tests with: - gateway-api-version: ${{ matrix.gateway-api-version }} - + k8sgateway-api-version: ${{ steps.dotenv.outputs.k8sgateway_api_version }} # TODO(tim): Add support for downloading the test results and creating # a pull request whenever a new release > 1.17+ is cut. diff --git a/changelog/v1.18.0-rc2/issue_10359.yaml b/changelog/v1.19.0-beta1/issue_10359.yaml similarity index 100% rename from changelog/v1.18.0-rc2/issue_10359.yaml rename to changelog/v1.19.0-beta1/issue_10359.yaml