fix: Collect Eclipse Che logs after tests on OpenShift (#1489)

* fix: Collect Eclipse Che logs after tests on OpenShift

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/1491/head
Anatolii Bazko 2022-08-29 15:58:01 +03:00 committed by GitHub
parent 76751f4613
commit 95b8b62598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,7 @@ catchFinish() {
local RESULT=$?
# Collect all Eclipse Che logs
set +e && chectl server:logs -n $NAMESPACE -d $ARTIFACTS_DIR && set -e
set +e && chectl server:logs -n $NAMESPACE -d $ARTIFACTS_DIR --telemetry off && set -e
[[ "${RESULT}" != "0" ]] && echo "[ERROR] Job failed." || echo "[INFO] Job completed successfully."
rm -rf ${OPERATOR_REPO}/tmp

View File

@ -19,6 +19,8 @@ source "${OPERATOR_REPO}/build/scripts/oc-tests/oc-common.sh"
#Stop execution on any error
trap "catchFinish" EXIT SIGINT
[[ -z "${CI_CHE_OPERATOR_IMAGE}" ]] && { echo [ERROR] CI_CHE_OPERATOR_IMAGE not defined; exit 1; }
runTests() {
# CI_CHE_OPERATOR_IMAGE it is che operator image built in openshift CI job workflow.
# More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates

View File

@ -26,6 +26,8 @@ trap "catchFinish" EXIT SIGINT
unset OPERATOR_TEST_NAMESPACE
[[ -z "${CI_CHE_OPERATOR_IMAGE}" ]] && { echo [ERROR] CI_CHE_OPERATOR_IMAGE not defined; exit 1; }
# Discover test namespace
# Eclipse Che subscription is pre-created by OpenShift CI
discoverOperatorTestNamespace() {