diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 171aec932fb..8167d6862d8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,11 @@ name: Release on: workflow_dispatch: + inputs: + validate: + type: boolean + default: false + description: "Validate the release artifacts" push: tags: - 'v*' @@ -115,3 +120,49 @@ jobs: IMAGE_REGISTRY: ${{ env.IMAGE_REGISTRY }} GORELEASER_ARGS: ${{ needs.setup.outputs.goreleaser_args }} GORELEASER_CURRENT_TAG: ${{ needs.setup.outputs.version }} + + validate: + name: Validate release artifacts + needs: [setup, helm, goreleaser] + if: ${{ startsWith(github.ref, 'refs/tags/') || inputs.validate == 'true' }} + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + + - name: Login to ghcr.io + if: ${{ github.event_name != 'pull_request' }} + run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.IMAGE_REGISTRY }} -u ${{ github.repository_owner }} --password-stdin + + - name: Download module dependencies + run: make mod-download + + - name: Setup kind cluster + run: ./ci/kind/setup-kind.sh + env: + VERSION: ${{ needs.setup.outputs.version }} + SKIP_DOCKER: "true" + CONFORMANCE: "true" + + - name: Install the released chart + run: | + helm install --create-namespace --namespace kgateway-system kgateway \ + oci://${{ env.IMAGE_REGISTRY }}/charts/kgateway \ + --version ${{ needs.setup.outputs.version }} \ + --set controller.image.registry=${{ env.IMAGE_REGISTRY }} \ + --set gateway.envoyContainer.image.registry=${{ env.IMAGE_REGISTRY }} \ + --set gateway.sdsContainer.image.registry=${{ env.IMAGE_REGISTRY }} \ + --wait --timeout 5m + + - name: Wait for the kgateway deployment to be ready + run: | + kubectl wait --for=condition=available --timeout=5m deployment/kgateway -n kgateway-system + + - name: Run Conformance Tests + run: make conformance + shell: bash + env: + VERSION: ${{ needs.setup.outputs.version }}