diff --git a/.github/workflows/_e2e_tests.yaml b/.github/workflows/_e2e_tests.yaml index c6c92ff2f0..5b1cd362d7 100644 --- a/.github/workflows/_e2e_tests.yaml +++ b/.github/workflows/_e2e_tests.yaml @@ -221,6 +221,11 @@ jobs: with: password: ${{ secrets.PULP_PASSWORD }} + - name: check availability of KIC image + id: check_kic_image + if: ${{ inputs.kic-image != '' }} + run: (docker manifest inspect ${{ inputs.kic-image }} && echo "kic_image=${{ inputs.kic-image }}" >> $GITHUB_OUTPUT) || true + - name: split image and tag id: split env: @@ -233,6 +238,15 @@ jobs: echo "kong-image=$kong_image" >> $GITHUB_OUTPUT echo "kong-tag=$kong_tag" >> $GITHUB_OUTPUT fi + if [ "${{ steps.check_kic_image.outputs.kic_image }}" != "" ]; then + export kic_image_repo=$(echo ${{ steps.check_kic_image.outputs.kic_image }} | awk '{split($0,a,":"); print a[1]}') + export kic_image_tag=$(echo ${{ steps.check_kic_image.outputs.kic_image }} | awk '{split($0,a,":"); print a[2]}') + echo "kic-image=$kic_image_repo" >> $GITHUB_OUTPUT + echo "kic-tag=$kic_image_tag" >> $GITHUB_OUTPUT + else + echo "kic-image=kong/nightly-ingress-controller" >> $GITHUB_OUTPUT + echo "kic-tag=nightly" >> $GITHUB_OUTPUT + fi # see the https://github.com/Kong/kubernetes-testing-framework/issues/587 TODO below # if we add local image GKE support, we probably need to split it into components here @@ -243,8 +257,8 @@ jobs: # therefore we need to use the nightly one. # TODO: Once we have a way to load images into GKE, we can use the local image. # KTF issue that should enable it: https://github.com/Kong/kubernetes-testing-framework/issues/587 - TEST_CONTROLLER_IMAGE: "kong/nightly-ingress-controller" - TEST_CONTROLLER_TAG: "nightly" + TEST_CONTROLLER_IMAGE: ${{ steps.split.outputs.kic-image }} + TEST_CONTROLLER_TAG: ${{ steps.split.outputs.kic-tag }} TEST_KONG_IMAGE: ${{ steps.split.outputs.kong-image }} TEST_KONG_TAG: ${{ steps.split.outputs.kong-tag }} TEST_KONG_EFFECTIVE_VERSION: ${{ inputs.kong-effective-version }}