Files
odo/.ibm/pipelines/windows-test.sh
Armel Soro 5d4a6ef325 Use staging Devfile registry for PR tests (#7129)
* Revert using a DEVFILE_PROXY env var

There is no proxy deployed in the internal test cluster.
As such, this env var no longer makes sense.

* To help troubleshoot, display the resolved Devfile registry URL

* Make interactive tests more resilient with stack versions

They are now able to determine if the "Select version" prompt
should be asked by "odo init" or not:

* Make sure doc automation tests do not rely on hard-coded namespaces

* Allow to run doc automation tests with more parallel Ginkgo nodes

This is possible now that those tests no longer
depend on a single hard-coded namespace.

* Remove occurrences of the DEVFILE_REGISTRY env var in IBM Pipelines scripts

* Reuse logic for determining the Devfile Registry URL in "odo registry" tests

* Clarify what openshiftci-config.sh is used for
2023-10-27 07:54:14 +00:00

42 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
###################################################
# This script is used to run the test on windows
# using the IBM DevOps Services.
#
source .ibm/pipelines/functions.sh
skip_if_only
LOGFILE="pr-${GIT_PR_NUMBER}-windows-tests-${BUILD_NUMBER}"
TEST_NAME="Windows Tests (OCP)"
export REPO=${REPO:-"https://github.com/redhat-developer/odo"}
#copy test script inside /tmp/
sshpass -p $WINDOWS_PASSWORD scp -o StrictHostKeyChecking=no ./.ibm/pipelines/windows-test-script.ps1 Administrator@$WINDOWS_IP:/tmp/windows-test-script.ps1
#execute test from the test script
export TEST_EXEC_NODES=${TEST_EXEC_NODES:-"16"}
sshpass -p $WINDOWS_PASSWORD ssh Administrator@$WINDOWS_IP -o StrictHostKeyChecking=no powershell /tmp/windows-test-script.ps1 "${GIT_PR_NUMBER}" "${BUILD_NUMBER}" "${API_KEY_QE}" "${IBM_OPENSHIFT_ENDPOINT}" "${LOGFILE}" "${REPO}" "${CLUSTER_ID}" "${TEST_EXEC_NODES}" "${SKIP_SERVICE_BINDING_TESTS}"
RESULT=$?
echo "RESULT: $RESULT"
# save log
ibmcloud login --apikey "${API_KEY}" -r "${IBM_REGION}"
sshpass -p $WINDOWS_PASSWORD scp -o StrictHostKeyChecking=no Administrator@$WINDOWS_IP:~/AppData/Local/Temp/${LOGFILE} /tmp/${LOGFILE}
save_logs "${LOGFILE}" "${TEST_NAME}" $RESULT
# save results
sshpass -p $WINDOWS_PASSWORD scp -o StrictHostKeyChecking=no Administrator@$WINDOWS_IP:~/AppData/Local/Temp/test-integration-nc.xml /tmp/
sshpass -p $WINDOWS_PASSWORD scp -o StrictHostKeyChecking=no Administrator@$WINDOWS_IP:~/AppData/Local/Temp/test-integration.xml /tmp/
sshpass -p $WINDOWS_PASSWORD scp -o StrictHostKeyChecking=no Administrator@$WINDOWS_IP:~/AppData/Local/Temp/test-e2e.xml /tmp/
save_results "/tmp/test-integration-nc.xml" "${LOGFILE}" "${TEST_NAME}" "${BUILD_NUMBER}"
save_results "/tmp/test-integration.xml" "${LOGFILE}" "${TEST_NAME}" "${BUILD_NUMBER}"
save_results "/tmp/test-e2e.xml" "${LOGFILE}" "${TEST_NAME}" "${BUILD_NUMBER}"
# cleanup
sshpass -p $WINDOWS_PASSWORD ssh Administrator@$WINDOWS_IP -o StrictHostKeyChecking=no rm -rf /tmp/windows-test-script.ps1
exit ${RESULT}