From e1ae06ec50f811384b3c8561931d8c67d112ba22 Mon Sep 17 00:00:00 2001 From: Dmytro Nochevnov Date: Fri, 19 Jan 2024 12:15:49 +0200 Subject: [PATCH] Get rid of failing curl in OpenShift CI jobs (#645) Signed-off-by: Dmytro Nochevnov --- .ci/openshift-ci/Dockerfile | 19 +++++-------------- .ci/openshift-ci/common.sh | 8 -------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile index 9696dfd326..51294a9c90 100644 --- a/.ci/openshift-ci/Dockerfile +++ b/.ci/openshift-ci/Dockerfile @@ -11,28 +11,19 @@ # Red Hat, Inc. - initial API and implementation # Dockerfile to bootstrap build and test in openshift-ci -FROM registry.access.redhat.com/ubi9/nodejs-18:1 +FROM registry.ci.openshift.org/openshift/release:golang-1.18 # hadolint ignore=DL3002 USER 0 # Install yq, kubectl, chectl cli used by olm/olm.sh script. # hadolint ignore=DL3041 -RUN set -x && dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs psmisc python3-pip jq golang httpd-tools \ - # already installed or installed as deps: - openssl openssl-devel ca-certificates make cmake cpp gcc gcc-c++ zlib zlib-devel brotli brotli-devel python3 nodejs-packaging && \ - dnf update -y && dnf clean all && \ - npm install -g yarn@1.22 npm@9 && \ - echo -n "node version: "; node -v; \ - echo -n "npm version: "; npm -v; \ - echo -n "yarn version: "; yarn -v; \ - go version; \ - pip3 install --upgrade pip setuptools yq && \ - - # Install kubectl, chectl cli used by olm/olm.sh script. +# Install yq, kubectl, chectl cli. +RUN yum install --assumeyes -d1 psmisc python3-pip httpd-tools nodejs && \ + pip3 install --upgrade setuptools && \ + pip3 install yq && \ 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 SHELL ["/bin/bash", "-c"] - diff --git a/.ci/openshift-ci/common.sh b/.ci/openshift-ci/common.sh index dfd9e0e611..277ed2fe36 100644 --- a/.ci/openshift-ci/common.sh +++ b/.ci/openshift-ci/common.sh @@ -490,7 +490,6 @@ testCloneGitRepoProjectShouldExists() { setupTestEnvironment() { OCP_USER_NAME=$1 - installOcClient provisionOpenShiftOAuthUser createCustomResourcesFile deployChe @@ -503,7 +502,6 @@ setupTestEnvironmentOAuthFlow() { APPLICATION_ID=$2 APPLICATION_SECRET=$3 - installOcClient provisionOpenShiftOAuthUser configureGitSelfSignedCertificate createCustomResourcesFile @@ -512,9 +510,3 @@ 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 -}