-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add cli backward compatibility
- Loading branch information
Showing
4 changed files
with
105 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# Set the repository owner and name | ||
OWNER="infinyon" | ||
REPO="fluvio" | ||
|
||
BACKWARD_SINCE_VERSION="0.11.10" | ||
|
||
# Fetch releases using GitHub API | ||
response=$(curl -s "https://api.github.com/repos/$OWNER/$REPO/releases") | ||
|
||
# Check if the response is empty or an error occurred | ||
if [ -z "$response" ]; then | ||
echo "Failed to fetch releases." | ||
exit 1 | ||
fi | ||
|
||
# Use jq to filter only non-prerelease releases | ||
versions=$(echo "$response" | jq -r '.[] | select(.prerelease == false) | .tag_name') | ||
|
||
$FLUVIO_BIN cluster delete --force | ||
|
||
for version in $versions; do | ||
# remove v prefix | ||
version=$(echo $version | sed 's/v//') | ||
echo "Running tests for version: $version" | ||
|
||
# Install current version on the cluster | ||
$FLUVIO_BIN cluster start | ||
# Install old version of the CLI | ||
curl -fsS https://hub.infinyon.cloud/install/install.sh?ctx=ci | VERSION=$version bash | ||
# Run the tests | ||
CLI_VERSION=$version SKIP_SETUP=true CI=false bats cli-platform-cross-version.bats | ||
$HOME/.fvm/versions/$CLI_VERSION/fluvio version >&3 | ||
|
||
|
||
if [[ $version == $BACKWARD_SINCE_VERSION ]]; then | ||
break | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters