From da066faf0844eda3149e2ea5ab0f78314133e8c9 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 22 Jun 2022 12:10:57 +0300 Subject: [PATCH] fix: Operator update on OpenShift test (#1409) * Fix Operator update on OpenShift test Signed-off-by: Anatolii Bazko --- .ci/oci-nightly-update.sh | 5 +++-- .ci/openshift-ci/Dockerfile | 4 +--- .github/workflows/build-catalog-and-bundle-images.yaml | 4 ++-- .github/workflows/release-community-operator-PRs.yml | 1 - .github/workflows/release.yml | 1 - make-release.sh | 2 -- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.ci/oci-nightly-update.sh b/.ci/oci-nightly-update.sh index c54902e6c..df7c63397 100755 --- a/.ci/oci-nightly-update.sh +++ b/.ci/oci-nightly-update.sh @@ -26,17 +26,18 @@ source "${OPERATOR_REPO}/.github/bin/common.sh" trap "catchFinish" EXIT SIGINT overrideDefaults() { - # CI_CHE_OPERATOR_IMAGE it is che operator image builded in openshift CI job workflow. More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates + # CI_CHE_OPERATOR_IMAGE it is che operator image built in openshift CI job workflow. More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates export OPERATOR_IMAGE=${CI_CHE_OPERATOR_IMAGE} } runTests() { deployDevWorkspaceOperator "stable" - deployEclipseCheWithOperator "chectl" "openshift" ${LAST_OPERATOR_VERSION_TEMPLATE_PATH} "false" + deployEclipseCheWithOperator "/tmp/chectl-${LAST_PACKAGE_VERSION}/chectl/bin/run" "openshift" ${LAST_OPERATOR_VERSION_TEMPLATE_PATH} "false" updateEclipseChe "chectl" "openshift" ${CURRENT_OPERATOR_VERSION_TEMPLATE_PATH} "true" } initDefaults initTemplates overrideDefaults +installchectl "${LAST_PACKAGE_VERSION}" runTests diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile index addf4de97..950e9ae3f 100644 --- a/.ci/openshift-ci/Dockerfile +++ b/.ci/openshift-ci/Dockerfile @@ -17,11 +17,9 @@ FROM registry.ci.openshift.org/openshift/release:golang-1.16 SHELL ["/bin/bash", "-c"] # Install yq, kubectl, chectl cli. -RUN yum install --assumeyes -d1 python3-pip httpd-tools && \ +RUN yum install --assumeyes -d1 python3-pip httpd-tools nodejs && \ pip3 install --upgrade setuptools && \ pip3 install yq && \ - pip3 install operator-courier==2.1.7 && \ - pip3 install pysemver && \ 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 && \ diff --git a/.github/workflows/build-catalog-and-bundle-images.yaml b/.github/workflows/build-catalog-and-bundle-images.yaml index 1efe9b41f..524006dcb 100644 --- a/.github/workflows/build-catalog-and-bundle-images.yaml +++ b/.github/workflows/build-catalog-and-bundle-images.yaml @@ -28,8 +28,8 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v1 - - name: Install yq and pysemver - run: sudo pip install yq pysemver + - name: Install yq + run: sudo pip install yq - name: Docker login uses: azure/docker-login@v1 with: diff --git a/.github/workflows/release-community-operator-PRs.yml b/.github/workflows/release-community-operator-PRs.yml index dc1f2c813..a79484ed5 100644 --- a/.github/workflows/release-community-operator-PRs.yml +++ b/.github/workflows/release-community-operator-PRs.yml @@ -40,7 +40,6 @@ jobs: - name: Install operator courier, yq run: | python -m pip install --upgrade pip - pip install operator-courier==2.1.7 pip install yq - name: Release community operator PR run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b8605a05..ed13d22d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,7 +57,6 @@ jobs: - name: Install operator courier, yq, and base32 wrapper run: | python -m pip install --upgrade pip - pip install operator-courier==2.1.7 pip install yq pip install semver # get base32 util from che-release project diff --git a/make-release.sh b/make-release.sh index 2ccf4fe76..265b2f4fb 100755 --- a/make-release.sh +++ b/make-release.sh @@ -48,10 +48,8 @@ init() { done [ -z "$QUAY_ECLIPSE_CHE_USERNAME" ] && echo "[ERROR] QUAY_ECLIPSE_CHE_USERNAME is not set" && exit 1 [ -z "$QUAY_ECLIPSE_CHE_PASSWORD" ] && echo "[ERROR] QUAY_ECLIPSE_CHE_PASSWORD is not set" && exit 1 - command -v operator-courier >/dev/null 2>&1 || { echo "[ERROR] operator-courier is not installed. Abort."; exit 1; } command -v operator-sdk >/dev/null 2>&1 || { echo "[ERROR] operator-sdk is not installed. Abort."; exit 1; } command -v skopeo >/dev/null 2>&1 || { echo "[ERROR] skopeo is not installed. Abort."; exit 1; } - command -v pysemver >/dev/null 2>&1 || { echo "[ERROR] pysemver is not installed. Abort."; exit 1; } REQUIRED_OPERATOR_SDK=$(yq -r ".\"operator-sdk\"" "${RELEASE_DIR}/REQUIREMENTS") [[ $(operator-sdk version) =~ .*${REQUIRED_OPERATOR_SDK}.* ]] || { echo "[ERROR] operator-sdk ${REQUIRED_OPERATOR_SDK} is required. Abort."; exit 1; } }