Skip to content

Commit

Permalink
Add version check step for keycloak - fix0
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Nov 29, 2023
1 parent de98ece commit e86c7b9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/cypress-test-oidc-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ jobs:
tar -xzf keycloak-${{ env.KEYCLOAK_VERSION }}.tar.gz
cd keycloak-${{ env.KEYCLOAK_VERSION }}/bin
chmod +x ./kc.sh
KC_ACTUAL_VERSION=$(./kc.sh --version | grep -oP 'Keycloak \K[^ ]+')
echo "Keycloak version: $KC_ACTUAL_VERSION"
if [ "$KC_ACTUAL_VERSION" != "${{ env.KEYCLOAK_VERSION }}" ]; then
echo "Version mismatch. Expected: ${{ env.KEYCLOAK_VERSION }}, Got: $KC_ACTUAL_VERSION"
KC_ACTUAL_VERSION=$(./kc.sh --version | grep -oP 'Keycloak \K[^ ]+' | tr -d '\r\n')
echo "Extracted version: '$KC_ACTUAL_VERSION'"
EXPECTED_VERSION=$(echo "${{ env.KEYCLOAK_VERSION }}" | tr -d '\r\n')
echo "Expected version: '$EXPECTED_VERSION'"
if [ "$KC_ACTUAL_VERSION" != "$EXPECTED_VERSION" ]; then
echo "Version mismatch. Expected: '$EXPECTED_VERSION', Got: '$KC_ACTUAL_VERSION'"
exit 1
else
echo "Version match confirmed."
fi
# Setup and Run Keycloak
Expand Down

0 comments on commit e86c7b9

Please sign in to comment.