fix: Operator update on OpenShift test (#1409)

* Fix Operator update on OpenShift test

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/1410/head
Anatolii Bazko 2022-06-22 12:10:57 +03:00 committed by GitHub
parent 38f6cb6381
commit da066faf08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 11 deletions

View File

@ -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

View File

@ -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 && \

View File

@ -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:

View File

@ -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: |

View File

@ -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

View File

@ -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; }
}