github.com/verrazzano/verrazzano@v1.7.1/ci/scripts/run_console_tests.sh (about) 1 #!/usr/bin/env bash 2 # 3 # Copyright (c) 2021, 2023, Oracle and/or its affiliates. 4 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 # 6 7 if [ -z "$GO_REPO_PATH" ]; then 8 echo "This script requires GO_REPO_PATH to be set, and is expected to only be called from Jenkins" 9 exit 1 10 fi 11 12 if [ "${ENABLE_DEX}" == "true" ]; then 13 echo "Skip running console tests, when Dex is enabled" 14 exit 0 15 fi 16 17 # Temporarily clone the console repo until it is moved to the Verrazzano repo 18 cd ${GO_REPO_PATH} 19 console_sha=${CONSOLE_REPO_BRANCH} 20 # if no branch override was supplied, use the console SHA present in the Verrazzano BOM 21 if [[ -z $console_sha ]]; then 22 # Get tag of console from BOM 23 # shellcheck disable=SC2002 24 console_tag=$(cat "verrazzano/platform-operator/verrazzano-bom.json" |jq -r '.components[] | select(.name == "verrazzano-console") | .subcomponents[] | select (.name == "verrazzano-console") | .images[] | select ((.image == "console") or (.image == "console-jenkins")) | .tag') 25 # Split tag on '-' character and get last element 26 console_sha=${console_tag##*-} 27 28 if [[ -z $console_sha ]]; then 29 echo "Failed to determine console SHA from Verrazzano BOM" 30 exit 1 31 fi 32 fi 33 34 echo "Using console commit(-ish) at $console_sha" 35 36 # Do a git clone of the console repo and checkout the commit sha (or branch or tag) provided 37 cd ${GO_REPO_PATH} 38 echo "Current dir $(pwd)" 39 git clone https://github.com/verrazzano/console.git 40 cd console 41 git checkout ${console_sha} 42 43 # Run the basic UI tests, and if they fail make sure to exit with a fail status 44 make run-ui-tests || exit 1 45 46 # Run the application page UI tests if specified 47 if [ "true" == "${RUN_APP_TESTS}" ]; then 48 echo "Running Application Page UI tests" 49 make run-app-page-test 50 fi