Skip to content

Commit

Permalink
use trap to copy test files to artifacts dir on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaianirh committed Feb 7, 2019
1 parent 53fface commit e526436
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test-prow-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ set -exuo pipefail
ARTIFACT_DIR=/tmp/artifacts
export ARTIFACT_DIR

function copyArtifacts {
echo "Copying artifacts from $(pwd)..."
cp -rv ./gui_test_screenshots "${ARTIFACT_DIR}/gui_test_screenshots"
}

trap copyArtifacts EXIT

./build.sh

oc login -u kubeadmin -p $(cat "${ARTIFACT_DIR}/installer/auth/kubeadmin-password")
Expand All @@ -14,6 +21,4 @@ source ./contrib/oc-environment.sh
kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/okd/manifests/0.8.0/0000_30_06-rh-operators.configmap.yaml
kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/okd/manifests/0.8.0/0000_30_09-rh-operators.catalogsource.yaml

./test-gui.sh e2e

cp -rv ./frontend/gui_test_screenshots "${ARTIFACT_DIR}/gui_test_screenshots"
. ./test-gui.sh e2e

0 comments on commit e526436

Please sign in to comment.