Files
odo/scripts/openshiftci-presubmit-all-tests.sh
Armel Soro fc2ffce43a Stop testing binding-related code since the Service Binding Operator has been deprecated [1]
Also add warning notes to the corresponding command reference pages.

This section used to cause a bunch of flaky tests,
even if it hasn't seen any changes over the past months/years.

[1] https://redhat-developer.github.io/service-binding-operator/userguide/intro.html
2024-07-18 00:08:12 +02:00

63 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
# This file is used for InterOP testing, i.e. testing odo with unreleased OpenShift versions.
# fail if some commands fails
set -e
# show commands
set -x
ARCH=$(uname -m)
export CI="openshift"
if [ "${ARCH}" == "s390x" ]; then
make configure-installer-tests-cluster-s390x
elif [ "${ARCH}" == "ppc64le" ]; then
make configure-installer-tests-cluster-ppc64le
else
make configure-installer-tests-cluster
fi
make bin
mkdir -p $GOPATH/bin
export PATH="$PATH:$(pwd):$GOPATH/bin"
export CUSTOM_HOMEDIR=$ARTIFACT_DIR
# Copy kubeconfig to temporary kubeconfig file
# Read and Write permission to temporary kubeconfig file
TMP_DIR=$(mktemp -d)
cp $KUBECONFIG $TMP_DIR/kubeconfig
chmod 640 $TMP_DIR/kubeconfig
export KUBECONFIG=$TMP_DIR/kubeconfig
# Login as developer
oc login -u developer -p password@123 --insecure-skip-tls-verify
# Check login user name for debugging purpose
oc whoami
# We want to use a stable Devfile registry for InterOP testing, and so we use the custom Devfile Registry setup on IBM cloud
source ./scripts/openshiftci-config.sh
# Integration tests
# Service Binding Operator deprecated as of Feb 2024
make test-integration-openshift-no-service-binding || error=true
# Login again (in case the token expires for some reason)
oc login -u developer -p password@123 --insecure-skip-tls-verify || true
oc whoami
# E2e tests
# Service Binding Operator deprecated as of Feb 2024
make test-e2e-no-service-binding || error=true
# Fail the build if there is any error while test execution
if [ $error ]; then
exit -1
fi
if [ ! -z "$ARTIFACT_DIR" ]
then
#copy artifact to $ARTIFACT_DIR if ARTIFACT_DIR var is exposed
cp -vr test-*.xml $ARTIFACT_DIR || true
fi
oc logout