-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: compatibility issues with old versions (#4247)
* test: add cli backward compatibility * fix: compatibility issues with old versions
- Loading branch information
Showing
6 changed files
with
101 additions
and
8 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
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 -e # Exit immediately if a command exits with a non-zero status | ||
|
||
# Set the repository owner and name | ||
OWNER="infinyon" | ||
REPO="fluvio" | ||
|
||
# The oldest version we want to test backward compatibility with | ||
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 | ||
|
||
# Filter only non-prerelease releases | ||
versions=$(echo "$response" | jq -r '.[] | select(.prerelease == false) | .tag_name') | ||
|
||
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 make cli-platform-cross-version-test | ||
|
||
# Check if we have reached the version we want to stop at | ||
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