From 066b561bd99d34578904a21440f9432b9ca519f5 Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Mon, 6 Nov 2023 21:03:38 +0000 Subject: [PATCH] dynamic validate-endpoints --- .github/workflows/build-test.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index ef3c88bb63..96ebdbb7a4 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -3493,13 +3493,17 @@ jobs: sleep 1 done + # get the version of the replicated-sdk that is running and set it as an output + REPLICATED_SDK_VERSION=$(kubectl get deploy replicated -n "$KOTS_NAMESPACE" -o jsonpath='{.spec.template.spec.containers[0].image}' | grep -oE '[^:]+$') + echo "replicated-sdk-version=$REPLICATED_SDK_VERSION" >> "$GITHUB_OUTPUT" + - run: rm -rf ./replicated-sdk - name: Checkout replicated-sdk uses: actions/checkout@v3 with: repository: replicatedhq/replicated-sdk path: replicated-sdk - ref: main # TODO: make this variable based on version of SDK running in the cluster + ref: ${{ steps.upgrade-to-replicated-sdk.outputs.replicated-sdk-version }} - name: Validate endpoints uses: ./replicated-sdk/.github/actions/validate-endpoints @@ -3566,13 +3570,17 @@ jobs: sleep 1 done + # get the version of the replicated-sdk that is running and set it as an output + REPLICATED_SDK_VERSION=$(kubectl get deploy replicated -n "$KOTS_NAMESPACE" -o jsonpath='{.spec.template.spec.containers[0].image}' | grep -oE '[^:]+$') + echo "replicated-sdk-version=$REPLICATED_SDK_VERSION" >> "$GITHUB_OUTPUT" + - run: rm -rf ./replicated-sdk - name: Checkout replicated-sdk uses: actions/checkout@v3 with: repository: replicatedhq/replicated-sdk path: replicated-sdk - ref: main # TODO: mmake this variable based on version of SDK running in the cluster + ref: ${{ steps.replicated-sdk-subchart-native-helm-v1.outputs.replicated-sdk-version }} - name: Validate endpoints uses: ./replicated-sdk/.github/actions/validate-endpoints @@ -3639,13 +3647,17 @@ jobs: sleep 1 done + # get the version of the replicated-sdk that is running and set it as an output + REPLICATED_SDK_VERSION=$(kubectl get deploy replicated -n "$KOTS_NAMESPACE" -o jsonpath='{.spec.template.spec.containers[0].image}' | grep -oE '[^:]+$') + echo "replicated-sdk-version=$REPLICATED_SDK_VERSION" >> "$GITHUB_OUTPUT" + - run: rm -rf ./replicated-sdk - name: Checkout replicated-sdk uses: actions/checkout@v3 with: repository: replicatedhq/replicated-sdk path: replicated-sdk - ref: main # TODO: make this variable based on version of SDK running in the cluster + ref: ${{ steps.replicated-sdk-subchart-replicated-helm.outputs.replicated-sdk-version }} - name: Validate endpoints uses: ./replicated-sdk/.github/actions/validate-endpoints