mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Renaming entrypoint scripts to use new job (#4419)
- 4.6 will now run the old presubmit-all script - psi will run as 4.6-e2e-4x-psi Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
This commit is contained in:
30
scripts/openshiftci-e2e-4x-psi-tests.sh
Normal file → Executable file
30
scripts/openshiftci-e2e-4x-psi-tests.sh
Normal file → Executable file
@@ -1,3 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
echo "For now. I am a placeholder. Please update me in psi poc after updating prow configs with new job for me"
|
||||
# fail if some commands fails
|
||||
set -e
|
||||
|
||||
# Hide command that deals with secrets
|
||||
set +x
|
||||
if [[ -f $ODO_RABBITMQ_AMQP_URL ]]; then
|
||||
export AMQP_URI=$(cat $ODO_RABBITMQ_AMQP_URL)
|
||||
fi
|
||||
export AMQP_URI=${AMQP_URI:?"Please set AMQP_URI env with amqp uri or provide path of file containing it as ODO_RABBITMQ_AMQP_URL env"}
|
||||
|
||||
# show commands
|
||||
set -x
|
||||
|
||||
export JOB_NAME="odo-pr-build"
|
||||
export REPO_URL="https://github.com/openshift/odo"
|
||||
# Extract PR NUMBER from prow job spec, which is injected by prow.
|
||||
export TARGET="$(jq .refs.pulls[0].number <<< $(echo $JOB_SPEC))"
|
||||
export CUSTOM_HOMEDIR=$ARTIFACT_DIR
|
||||
|
||||
##### ci-firewall parameters end
|
||||
# The version of CI_FIREWALL TO USE
|
||||
export CI_FIREWALL_VERSION="valpha"
|
||||
|
||||
echo "Getting ci-firewall, see https://github.com,/mohammedzee1000/ci-firewall"
|
||||
curl -kLO https://github.com/mohammedzee1000/ci-firewall/releases/download/valpha/ci-firewall-linux-amd64.tar.gz
|
||||
tar -xzf ci-firewall-linux-amd64.tar.gz
|
||||
./ci-firewall request --runscript scripts/run_all_tests.sh --timeout 2h15m
|
||||
|
||||
@@ -2,28 +2,68 @@
|
||||
|
||||
# fail if some commands fails
|
||||
set -e
|
||||
|
||||
# Hide command that deals with secrets
|
||||
set +x
|
||||
if [[ -f $ODO_RABBITMQ_AMQP_URL ]]; then
|
||||
export AMQP_URI=$(cat $ODO_RABBITMQ_AMQP_URL)
|
||||
fi
|
||||
export AMQP_URI=${AMQP_URI:?"Please set AMQP_URI env with amqp uri or provide path of file containing it as ODO_RABBITMQ_AMQP_URL env"}
|
||||
|
||||
# show commands
|
||||
set -x
|
||||
|
||||
export JOB_NAME="odo-pr-build"
|
||||
export REPO_URL="https://github.com/openshift/odo"
|
||||
# Extract PR NUMBER from prow job spec, which is injected by prow.
|
||||
export TARGET="$(jq .refs.pulls[0].number <<< $(echo $JOB_SPEC))"
|
||||
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
|
||||
make goget-ginkgo
|
||||
export PATH="$PATH:$(pwd):$GOPATH/bin"
|
||||
export CUSTOM_HOMEDIR=$ARTIFACT_DIR
|
||||
|
||||
##### ci-firewall parameters end
|
||||
# The version of CI_FIREWALL TO USE
|
||||
export CI_FIREWALL_VERSION="valpha"
|
||||
# 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
|
||||
|
||||
echo "Getting ci-firewall, see https://github.com,/mohammedzee1000/ci-firewall"
|
||||
curl -kLO https://github.com/mohammedzee1000/ci-firewall/releases/download/valpha/ci-firewall-linux-amd64.tar.gz
|
||||
tar -xzf ci-firewall-linux-amd64.tar.gz
|
||||
./ci-firewall request --runscript scripts/run_all_tests.sh --timeout 2h15m
|
||||
# Login as developer
|
||||
odo login -u developer -p password@123
|
||||
|
||||
# Check login user name for debugging purpose
|
||||
oc whoami
|
||||
|
||||
if [ "${ARCH}" == "s390x" ]; then
|
||||
# Integration tests
|
||||
make test-integration
|
||||
make test-cmd-login-logout
|
||||
make test-cmd-project
|
||||
# E2e tests
|
||||
make test-e2e-all
|
||||
elif [ "${ARCH}" == "ppc64le" ]; then
|
||||
# Integration tests
|
||||
make test-integration
|
||||
make test-cmd-login-logout
|
||||
make test-cmd-project
|
||||
# E2e tests
|
||||
make test-e2e-all
|
||||
else
|
||||
# Integration tests
|
||||
make test-integration || error=true
|
||||
make test-integration-devfile || error=true
|
||||
make test-cmd-login-logout || error=true
|
||||
make test-cmd-project || error=true
|
||||
make test-operator-hub || error=true
|
||||
|
||||
# E2e tests
|
||||
make test-e2e-all || error=true
|
||||
|
||||
# Fail the build if there is any error while test execution
|
||||
if [ $error ]; then
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
|
||||
cp -r reports $ARTIFACT_DIR
|
||||
|
||||
odo logout
|
||||
Reference in New Issue
Block a user