Created
July 26, 2021 08:44
-
-
Save felipecruz91/1c15f05c2d70b79dd047d9e886de9d6e to your computer and use it in GitHub Desktop.
ods quickstarter tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.15.2 | |
ENV http_proxy <CORPORATE_PROXY_URL_WITH_PORT> | |
ENV https_proxy <CORPORATE_PROXY_URL_WITH_PORT> | |
ENV HTTP_PROXY <CORPORATE_PROXY_URL_WITH_PORT> | |
ENV HTTPS_PROXY <CORPORATE_PROXY_URL_WITH_PORT> | |
RUN go get -u github.com/jstemmer/go-junit-report | |
RUN wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && \ | |
tar -xzf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && \ | |
cd openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit && \ | |
chmod +x ./oc && \ | |
mv ./oc /usr/bin && \ | |
mv ./kubectl /usr/bin && \ | |
rm -rf openshift-origin-client-tools-* | |
RUN apt-get update -y && \ | |
apt-get install -y jq | |
WORKDIR /work | |
COPY ./entrypoint.sh / | |
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Unset proxy | |
unset http_proxy | |
unset https_proxy | |
unset HTTP_PROXY | |
unset HTTPS_PROXY | |
# Load envs from ods-core.env | |
export $(egrep -v '^#' ./ods-configuration/ods-core.env) | |
printenv | |
# Log into the cluster | |
oc login --insecure-skip-tls-verify $OPENSHIFT_CONSOLE_HOST -n $ODS_NAMESPACE | |
oc whoami | |
# Configure again proxy | |
export NO_PROXY=<CORPORATE_NO_PROXY> | |
export no_proxy=$NO_PROXY | |
export http_proxy=<CORPORATE_PROXY_URL_WITH_PORT> | |
export https_proxy=<CORPORATE_PROXY_URL_WITH_PORT> | |
export HTTP_PROXY=$http_proxy | |
export HTTPS_PROXY=$https_proxy | |
QUICKSTARTER="" | |
cd ods-quickstarters/tests | |
while [[ "$#" -gt 0 ]]; do case $1 in | |
-q=*|--quickstarter=*) QUICKSTARTER="${1#*=}";; | |
-q|--quickstarter) QUICKSTARTER="$2"; shift;; | |
esac; shift; done | |
if [ -z "${QUICKSTARTER}" ]; then | |
echo "--quickstarter not specified thus running all the tests"; | |
make test | |
else | |
echo "Running quickstarter: ${QUICKSTARTER}" | |
make test QUICKSTARTER=${QUICKSTARTER} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment