mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
fix openshift login failure (#5530)
Signed-off-by: anandrkskd <anandrkskd@gmail.com> add login check Signed-off-by: anandrkskd <anandrkskd@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ca1a55d304
commit
dad8b6eeea
@@ -4,6 +4,9 @@ LOGFILE="pr-${GIT_PR_NUMBER}-openshift-tests-${BUILD_NUMBER}"
|
||||
|
||||
source .ibm/pipelines/functions.sh
|
||||
|
||||
ibmcloud login --apikey "${API_KEY_QE}"
|
||||
ibmcloud target -r eu-de
|
||||
ibmcloud oc cluster config -c "${CLUSTER_ID}"
|
||||
oc login -u apikey -p "${API_KEY_QE}" "${IBM_OPENSHIFT_ENDPOINT}"
|
||||
|
||||
cleanup_namespaces
|
||||
|
||||
@@ -55,9 +55,14 @@ function Run-Test {
|
||||
|
||||
[Environment]::SetEnvironmentVariable("SKIP_USER_LOGIN_TESTS","true")
|
||||
|
||||
Shout "Login IBMcloud"
|
||||
ibmcloud login --apikey ${API_KEY}
|
||||
ibmcloud target -r eu-de
|
||||
ibmcloud oc cluster config -c ${CLUSTER_ID}
|
||||
|
||||
Shout "Login Openshift"
|
||||
oc login -u apikey -p ${API_KEY} ${IBM_OPENSHIFT_ENDPOINT}
|
||||
Check-ExitCode $LASTEXITCODE
|
||||
|
||||
Shout "Create Binary"
|
||||
make install
|
||||
@@ -83,6 +88,7 @@ $API_KEY=$args[2]
|
||||
$IBM_OPENSHIFT_ENDPOINT=$args[3]
|
||||
$LOGFILE=$args[4]
|
||||
$REPO=$args[5]
|
||||
$CLUSTER_ID=$args[6]
|
||||
Shout "Args Recived"
|
||||
|
||||
# Pre test cleanup
|
||||
|
||||
@@ -13,7 +13,7 @@ export REPO=${REPO:-"https://github.com/redhat-developer/odo"}
|
||||
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
|
||||
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}"
|
||||
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}" "${WINDOWS_IP}" "${CLUSTER_ID}"
|
||||
RESULT=$?
|
||||
echo "RESULT: $RESULT"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user