Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/kubectl-helm-minikube/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "kubectl-helm-minikube",
"version": "1.2.1",
"version": "1.2.2",
"name": "Kubectl, Helm, and Minikube",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube",
"description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.",
Expand Down
3 changes: 2 additions & 1 deletion src/kubectl-helm-minikube/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ fi
find_version_from_git_tags() {
local variable_name=$1
local requested_version=${!variable_name}
requested_version="${requested_version#v}"
if [ "${requested_version}" = "none" ]; then return; fi
local repository=$2
local prefix=${3:-"tags/v"}
local separator=${4:-"."}
local last_part_optional=${5:-"false"}
local last_part_optional=${5:-"false"}
if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then
local escaped_separator=${separator//./\\.}
local last_part
Expand Down
28 changes: 28 additions & 0 deletions test/kubectl-helm-minikube/install_kubectl_with_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e

# Optional: Import test library
source dev-container-features-test-lib

set +e
kubectl
Comment thread
Mathiyarasy marked this conversation as resolved.
Outdated
exit_code=$?
check "kubectl-is-installed" bash -c "echo ${exit_code} | grep 0"
echo "kubectl version:"
kubectl version --client

helm version
exit_code=$?
check "helm-is-installed" bash -c "echo ${exit_code} | grep 0"
echo "helm version:"
helm version

minikube version
exit_code=$?
check "minikube-is-installed" bash -c "echo ${exit_code} | grep 0"
echo "minikube version:"
minikube version
set -e

# Report result
reportResults
28 changes: 28 additions & 0 deletions test/kubectl-helm-minikube/install_kubectl_without_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e

# Optional: Import test library
source dev-container-features-test-lib

set +e
kubectl
exit_code=$?
check "kubectl-is-installed" bash -c "echo ${exit_code} | grep 0"
echo "kubectl version:"
kubectl version --client

helm version
exit_code=$?
check "helm-is-installed" bash -c "echo ${exit_code} | grep 0"
echo "helm version:"
helm version

minikube version
exit_code=$?
check "minikube-is-installed" bash -c "echo ${exit_code} | grep 0"
echo "minikube version:"
minikube version
set -e

# Report result
reportResults
22 changes: 21 additions & 1 deletion test/kubectl-helm-minikube/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,25 @@
"minikube": "none"
}
}
},
"install_kubectl_without_version": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"kubectl-helm-minikube": {
"version": "1.30",
"helm": "3.16",
"minikube": "1.28"
}
}
},
"install_kubectl_with_version": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"kubectl-helm-minikube": {
"version": "v1.33.0",
"helm": "v3.17.3",
"minikube": "v1.31.1"
}
}
}
}
}