Files
odo/.ibm/pipelines/unit-tests.sh
Philippe Martin 07ef685df7 Use an image with pre-installed oc/kubectl/ibmcloud for IBM Pipelines (#5269)
* Use an image with pre-installed oc/kubectl/ibmcloud for IBM Pipelines

* Increase time for unit tests (very long on single CPU VM)

* Dockerfile for build image
2021-12-03 17:02:46 +01:00

19 lines
331 B
Bash

#!/bin/bash
LOGFILE="pr-${GIT_PR_NUMBER}-unit-tests-${BUILD_NUMBER}"
source .ibm/pipelines/functions.sh
(
set -e
make goget-tools
make validate
make test
) |& tee "/tmp/$LOGFILE"
RESULT=${PIPESTATUS[0]}
ibmcloud login --apikey "${API_KEY}" -r "${IBM_REGION}"
save_logs "${LOGFILE}" "Unit Tests"
exit ${RESULT}