| 12345678910111213141516171819202122232425262728 |
- #!/usr/bin/env bash
- set -exuo pipefail
- ARTIFACT_DIR=${ARTIFACT_DIR:=/tmp/artifacts}
- SCREENSHOTS_DIR=integration-tests/screenshots
- INSTALLER_DIR=${INSTALLER_DIR:=${ARTIFACT_DIR}/installer}
- function copyArtifacts {
- if [ -d "$ARTIFACT_DIR" ] && [ -d "$SCREENSHOTS_DIR" ]; then
- echo "Copying artifacts from $(pwd)..."
- cp -r "$SCREENSHOTS_DIR" "${ARTIFACT_DIR}/integration-tests/screenshots"
- fi
- }
- trap copyArtifacts EXIT
- # don't log kubeadmin-password
- set +x
- BRIDGE_KUBEADMIN_PASSWORD="$(cat "${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}")"
- export BRIDGE_KUBEADMIN_PASSWORD
- set -x
- BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')"
- export BRIDGE_BASE_ADDRESS
- echo "Runs Cypress tests in headless mode"
- yarn run test-cypress-headless
|