Skip to content

Commit

Permalink
store kots versions in s3 bucket with a 'v' prefix (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored Jun 14, 2024
1 parent 3ed87ba commit 580cb86
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion e2e/scripts/check-airgap-installation-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ main() {
fi

echo "ensure that the admin console branding is available and has the DR label"
if ! kubectl get cm -n kotsadm -l replicated.com/disaster-recovery=infra | grep -q kotsadm-application-metadata; then
if ! kubectl get cm -n kotsadm kotsadm-application-metadata --show-labels | grep -q 'replicated.com/disaster-recovery=infra'; then
echo "kotsadm-application-metadata configmap not found with the DR label"
kubectl get cm -n kotsadm --show-labels
kubectl get cm -n kotsadm kotsadm-application-metadata -o yaml
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/check-airgap-post-ha-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ main() {
fi

echo "ensure that the admin console branding is available and has the DR label"
if ! kubectl get cm -n kotsadm -l replicated.com/disaster-recovery=infra | grep -q kotsadm-application-metadata; then
if ! kubectl get cm -n kotsadm kotsadm-application-metadata --show-labels | grep -q 'replicated.com/disaster-recovery=infra'; then
echo "kotsadm-application-metadata configmap not found with the DR label"
kubectl get cm -n kotsadm --show-labels
kubectl get cm -n kotsadm kotsadm-application-metadata -o yaml
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/check-installation-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ main() {
fi

echo "ensure that the admin console branding is available and has the DR label"
if ! kubectl get cm -n kotsadm -l replicated.com/disaster-recovery=infra | grep -q kotsadm-application-metadata; then
if ! kubectl get cm -n kotsadm kotsadm-application-metadata --show-labels | grep -q 'replicated.com/disaster-recovery=infra'; then
echo "kotsadm-application-metadata configmap not found with the DR label"
kubectl get cm -n kotsadm --show-labels
kubectl get cm -n kotsadm kotsadm-application-metadata -o yaml
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/check-post-ha-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ main() {
fi

echo "ensure that the admin console branding is available and has the DR label"
if ! kubectl get cm -n kotsadm -l replicated.com/disaster-recovery=infra | grep -q kotsadm-application-metadata; then
if ! kubectl get cm -n kotsadm kotsadm-application-metadata --show-labels | grep -q 'replicated.com/disaster-recovery=infra'; then
echo "kotsadm-application-metadata configmap not found with the DR label"
kubectl get cm -n kotsadm --show-labels
kubectl get cm -n kotsadm kotsadm-application-metadata -o yaml
Expand Down
5 changes: 3 additions & 2 deletions scripts/cache-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function kotsbin() {
local kots_version=
kots_version=$(awk '/^ADMIN_CONSOLE_CHART_VERSION/{print $3}' Makefile)
kots_version=$(echo "${kots_version}" | sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')
kots_version=$(echo "v${kots_version}") #reinclude 'v' in kots version string

local kots_override=
kots_override=$(awk '/^KOTS_BINARY_URL_OVERRIDE/{gsub("\"", "", $3); print $3}' Makefile)
Expand All @@ -112,8 +113,8 @@ function kotsbin() {
curl --fail-with-body -L -o "kots_linux_amd64.tar.gz" "${kots_override}"
else
# download the kots binary from github
echo "downloading kots binary from https://github.com/replicatedhq/kots/releases/download/v${kots_version}/kots_linux_amd64.tar.gz"
curl --fail-with-body -L -o "kots_linux_amd64.tar.gz" "https://github.com/replicatedhq/kots/releases/download/v${kots_version}/kots_linux_amd64.tar.gz"
echo "downloading kots binary from https://github.com/replicatedhq/kots/releases/download/${kots_version}/kots_linux_amd64.tar.gz"
curl --fail-with-body -L -o "kots_linux_amd64.tar.gz" "https://github.com/replicatedhq/kots/releases/download/${kots_version}/kots_linux_amd64.tar.gz"
fi

# decompress the bundle, as we only care about the binary and not the sbom/license/readme
Expand Down

0 comments on commit 580cb86

Please sign in to comment.