Skip to content

Commit

Permalink
fix: talosctl exclude prereleases and add version test
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Plant <[email protected]>
  • Loading branch information
pl4nty committed Oct 19, 2024
1 parent 793a947 commit 5fac77d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/talosctl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ $nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/gh-release:1" \
--option repo='siderolabs/talos' --option binaryNames='talosctl' --option version="$VERSION"
--option repo='siderolabs/talos' --option binaryNames='talosctl' --option version="$VERSION" --option releaseTagRegex='^(?!.*(alpha|beta)).*$'

echo 'Done!'
8 changes: 8 additions & 0 deletions test/talosctl/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
"features": {
"talosctl": {}
}
},
"test_specific_version": {
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"talosctl": {
"version": "v1.8.0"
}
}
}
}
2 changes: 1 addition & 1 deletion test/talosctl/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e

source dev-container-features-test-lib

check "talosctl version --client" talosctl version --client
check "talosctl is installed" talosctl version --client

reportResults
9 changes: 9 additions & 0 deletions test/talosctl/test_specific_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e

source dev-container-features-test-lib

check "talosctl version is equal to v1.8.0" sh -c "talosctl version --client | grep 'v1.8.0'"

reportResults

0 comments on commit 5fac77d

Please sign in to comment.