Move installation of oc client from Dockerfile to common.sh (#644)

Signed-off-by: Dmytro Nochevnov <dnochevn@redhat.com>
pull/645/head
Dmytro Nochevnov 2024-01-18 16:41:12 +02:00 committed by GitHub
parent 76913d93c2
commit 901a30ea8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -32,9 +32,7 @@ RUN set -x && dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin && \
bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next && \
curl -v https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.14/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \
chmod ug+x /usr/local/bin/oc
bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next
SHELL ["/bin/bash", "-c"]

View File

@ -490,6 +490,7 @@ testCloneGitRepoProjectShouldExists() {
setupTestEnvironment() {
OCP_USER_NAME=$1
installOcClient
provisionOpenShiftOAuthUser
createCustomResourcesFile
deployChe
@ -502,6 +503,7 @@ setupTestEnvironmentOAuthFlow() {
APPLICATION_ID=$2
APPLICATION_SECRET=$3
installOcClient
provisionOpenShiftOAuthUser
configureGitSelfSignedCertificate
createCustomResourcesFile
@ -510,3 +512,9 @@ setupTestEnvironmentOAuthFlow() {
createOAuthApplicationGitLabServer ${ADMIN_ACCESS_TOKEN} ${APPLICATION_NAME}
setupOAuthSecret ${APPLICATION_ID} ${APPLICATION_SECRET}
}
installOcClient() {
set -x
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.14/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \
chmod ug+x /usr/local/bin/oc
}