From 17c69bf66e364d4b090a9ed369005c988bf4b996 Mon Sep 17 00:00:00 2001 From: gosharo Date: Mon, 18 Dec 2023 07:28:07 +0200 Subject: [PATCH] fix: e2e test --- .github/workflows/e2e.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0ce6ebb6..64e4a40b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -128,6 +128,7 @@ jobs: [ ! -z "$RESULT" ] && echo "CRD created $RESULT" || { echo "Workflow not exists, existing..."; exit 1; } ## check if status phase not Failed, if yes, show message - RESULT=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=${{ github.head_ref }}-test --no-headers -o custom-columns="Status:status.phase") - MESSAGE=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=${{ github.head_ref }}-test --no-headers -o custom-columns="Status:status.message") + BRANCH_VALID_STRING =$(echo ${{ github.head_ref }}-test | tr '[:upper:]' '[:lower:]' | tr '_' '-' | tr -cd 'a-z0-9.\-') + RESULT=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=$BRANCH_VALID_STRING --no-headers -o custom-columns="Status:status.phase") + MESSAGE=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=$BRANCH_VALID_STRING --no-headers -o custom-columns="Status:status.message") [ ! "$RESULT" == "Failed" ] && echo "CRD created $MESSAGE" || { echo "Workflow Failed $MESSAGE, existing..."; exit 1; } \ No newline at end of file