forked from openshift/distributed-tracing-console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-prow-e2e.sh
executable file
·37 lines (29 loc) · 997 Bytes
/
test-prow-e2e.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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
if [[ -z "$(ls -A -- "$SCREENSHOTS_DIR")" ]]; then
echo "No artifacts were copied."
else
echo "Copying artifacts from $(pwd)..."
cp -r "$SCREENSHOTS_DIR" "${ARTIFACT_DIR}/screenshots"
fi
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 "Install dependencies"
if [ ! -d node_modules ]; then
yarn install
fi
echo "Runs Cypress tests in headless mode"
yarn run test-cypress-headless