mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-18 15:56:47 +00:00
[Windows] Add more docker tests and move K8s tools into single provisioner (#2583)
* 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
This commit is contained in:
24
images/win/scripts/Installers/Install-KubernetesTools.ps1
Normal file
24
images/win/scripts/Installers/Install-KubernetesTools.ps1
Normal file
@@ -0,0 +1,24 @@
|
||||
################################################################################
|
||||
## 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"
|
||||
Reference in New Issue
Block a user