Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade tests from arbitrary older releases #673

Merged
merged 1 commit into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/upgrade-create-new-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -ex

DEPLOY_DIR="./deploy"
PACKAGE_DIR="${DEPLOY_DIR}/olm-catalog/kubevirt-hyperconverged"
LATEST_VERSION=$(ls -d ${PACKAGE_DIR}/*/ | sort -r | head -1 | cut -d '/' -f 5)
LATEST_VERSION=$(ls -d ${PACKAGE_DIR}/*/ | sort -rV | head -1 | cut -d '/' -f 5)

OPERATOR_NAME="kubevirt-hyperconverged-operator"
LATEST_CSV_DIR="${PACKAGE_DIR}/${LATEST_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion hack/upgrade-openshiftci-config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
HCO_OPERATOR_IMAGE=`eval echo ${IMAGE_FORMAT}`
CI_IMAGE_URL_PREFIX=$(echo $HCO_OPERATOR_IMAGE | cut -d ":" -f 1)
echo "CI_IMAGE_URL_PREFIX: $CI_IMAGE_URL_PREFIX"
REGISTRY_IMAGE="quay.io/kubevirt/hco-container-registry:latest" # TODO: handle a complex upgrade matrix
REGISTRY_IMAGE="quay.io/kubevirt/hco-container-registry:latest"
REGISTRY_IMAGE_UPGRADE="${CI_IMAGE_URL_PREFIX}:hco-registry-upgrade"
REGISTRY_IMAGE_URL_PREFIX=$CI_IMAGE_URL_PREFIX
HCO_CATALOG_NAMESPACE="openshift-marketplace"
Expand Down
5 changes: 5 additions & 0 deletions hack/upgrade-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

MAX_STEPS=8
CUR_STEP=1
RELEASE_DELTA="${RELEASE_DELTA:-1}"

function Msg {
{ set +x; } 2>/dev/null
Expand Down Expand Up @@ -107,6 +108,9 @@ Msg "create catalogsource and subscription to install HCO"
HCO_NAMESPACE="kubevirt-hyperconverged"
HCO_KIND="hyperconvergeds"
HCO_RESOURCE_NAME="kubevirt-hyperconverged"
PACKAGE_DIR="./deploy/olm-catalog/kubevirt-hyperconverged"
INITIAL_CHANNEL=$(ls -d ${PACKAGE_DIR}/*/ | sort -rV | awk "NR==$((RELEASE_DELTA+1))" | cut -d '/' -f 5)
echo "INITIAL_CHANNEL: $INITIAL_CHANNEL"

${CMD} create ns ${HCO_NAMESPACE} | true
${CMD} get pods -n ${HCO_NAMESPACE}
Expand All @@ -129,6 +133,7 @@ metadata:
name: hco-catalogsource-example
namespace: ${HCO_CATALOG_NAMESPACE}
spec:
channel: ${INITIAL_CHANNEL}
sourceType: grpc
image: ${REGISTRY_IMAGE}
displayName: KubeVirt HyperConverged
Expand Down