Skip to content

Commit

Permalink
chore: ci, fix cd_dev upgrade-test.sh pull intended ver (#3704)
Browse files Browse the repository at this point in the history
* chore: ci, fix cd_dev upgrade-test.sh pull intended ver

* ci: set FLUVIO_IMAGE_TAG_STRATEGY

* chore: ci, cd_dev, add strategy for verify_latest_rel
  • Loading branch information
digikata authored Nov 14, 2023
1 parent df8e338 commit 33f86c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cd_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
else
export PROXY=""
fi
FLUVIO_IMAGE_TAG_STRATEGY=version-git \
fluvio cluster start --spu-storage-size 1 $PROXY
- name: Run E2E Test
timeout-minutes: 2
Expand Down
14 changes: 9 additions & 5 deletions tests/upgrade-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ function validate_cluster_stable() {

# This is more for ensuring local dev will pass this test if you've changed your channel
echo "Switch to \"stable\" channel CLI"
~/.fvm/bin/fvm switch stable
~/.fvm/bin/fvm switch stable

echo "Installing stable fluvio cluster"
$STABLE_FLUVIO cluster start
$STABLE_FLUVIO cluster start
ci_check;

# Baseline: CLI version and platform version are expected to be the same
Expand Down Expand Up @@ -140,17 +140,21 @@ function validate_upgrade_cluster_to_prerelease() {
FLUVIO_BIN_ABS_PATH=${HOME}/.fluvio/bin/fluvio

~/.fvm/bin/fvm install latest | tee /tmp/installer.output
DEV_VERSION=$(cat /tmp/installer.output | grep "fluvio@" | awk '{print $4}' | cut -b 8-)
~/.fvm/bin/fvm switch latest
# expectd output fvm current => 0.11.0-dev-1+hash (latest)
DEV_VERSION=$(~/.fvm/bin/fvm current | awk '{print $1}')

TARGET_VERSION=${DEV_VERSION::-41}
TARGET_VERSION=${DEV_VERSION}
echo "Installed CLI version ${DEV_VERSION}"
echo "Upgrading cluster to ${DEV_VERSION}"
echo "Target Version ${TARGET_VERSION}"

FLUVIO_IMAGE_TAG_STRATEGY=version-git \
$FLUVIO_BIN_ABS_PATH cluster upgrade
echo "Wait for SPU to be upgraded. sleeping 1 minute"
else
echo "Test local image v${PRERELEASE}"
TARGET_VERSION=${PRERELEASE::-41}
echo "Target Version ${TARGET_VERSION}"
# This should use the binary that the Makefile set

echo "Using Fluvio binary located @ ${FLUVIO_BIN_ABS_PATH}"
Expand Down

0 comments on commit 33f86c5

Please sign in to comment.