mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
* Add more docker tests * Rework tools installation and test * remove docker tests from tools * get back kind installation * transform kind download link to string * add Add-MachinePathItem after kind installation
24 lines
1.0 KiB
PowerShell
24 lines
1.0 KiB
PowerShell
################################################################################
|
|
## File: Install-KubernetesTools.ps1
|
|
## Desc: Install tools for K8s.
|
|
################################################################################
|
|
|
|
Write-Host "Install Kind"
|
|
# Choco installation can't be used because it depends on docker-desktop
|
|
$url = 'https://api.github.com/repos/kubernetes-sigs/kind/releases/latest'
|
|
[System.String] $kindDownloadLink = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "kind-windows-amd64"
|
|
$destFilePath = "C:\ProgramData\kind"
|
|
$null = New-Item -Path $destFilePath -ItemType Directory -Force
|
|
Start-DownloadWithRetry -Url $kindDownloadLink -Name "kind.exe" -DownloadPath $destFilePath
|
|
Add-MachinePathItem $destFilePath
|
|
|
|
Write-Host "Install Kubectl"
|
|
Choco-Install -PackageName kubernetes-cli
|
|
|
|
Write-Host "Install Helm"
|
|
Choco-Install -PackageName kubernetes-helm
|
|
|
|
Write-Host "Install Minikube"
|
|
Choco-Install -PackageName minikube
|
|
|
|
Invoke-PesterTests -TestFile "Tools" -TestName "KubernetesTools" |