Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kubernetes/minikube into gcp-auth…
Browse files Browse the repository at this point in the history
…-multiarch
  • Loading branch information
sharifelgamal committed Feb 3, 2021
2 parents 93bf630 + 9d091e6 commit 6fb41b7
Show file tree
Hide file tree
Showing 21 changed files with 898 additions and 126 deletions.
192 changes: 192 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,198 @@ jobs:
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
if [ "$numPass" -lt 26 ];then echo "*** Failed to pass at least 26 ! ***";exit 2;fi
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
scheduled_stop_docker_windows:
needs: [build_minikube]
env:
TIME_ELAPSED: time
JOB_NAME: "scheduled_stop_docker_windows"
GOPOGH_RESULT: ""
STAT: ""
runs-on: [self-hosted, windows-10-ent, 8CPUs]
steps:
- name: Clean up
continue-on-error: true
shell: powershell
run: |
echo $env:computerName
ls
$ErrorActionPreference = "SilentlyContinue"
cd minikube_binaries
ls
$env:KUBECONFIG="${pwd}\testhome\kubeconfig"
$env:MINIKUBE_HOME="${pwd}\testhome"
.\minikube-windows-amd64.exe delete --all --purge
Get-VM | Where-Object {$_.Name -ne "DockerDesktopVM"} | Foreach {
.\minikube-windows-amd64.exe delete -p $_.Name
Suspend-VM $_.Name
Stop-VM $_.Name -Force
Remove-VM $_.Name -Force
}
cd ..
Remove-Item minikube_binaries -Force -Recurse
ls
- name: Download Binaries
uses: actions/download-artifact@v1
with:
name: minikube_binaries
- name: Start Docker Desktop
shell: powershell
continue-on-error: true
run: |
$ErrorActionPreference = "SilentlyContinue"
docker ps 2>&1 | Out-Null
$docker_running = $?
if (!$docker_running) {
Write-Output "Starting Docker as an administrator"
Start-Process 'C:/Program Files/Docker/Docker/Docker Desktop.exe' -Verb runAs
}
while (!$docker_running) {
Start-Sleep 5
docker ps 2>&1 | Out-Null
$docker_running = $?
}
Write-Output "Docker is running"
docker system prune -f
- name: Info
shell: powershell
run: |
echo $env:computername
echo "------------------------"
docker info
echo "------------------------"
docker volume ls
echo "------------------------"
docker system info --format '{{json .}}'
echo "------------------------"
- uses: actions/setup-go@v2
with:
go-version: '1.15.5'
stable: true
- name: Install tools
continue-on-error: true
shell: powershell
run: |
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
choco install -y kubernetes-cli
choco install -y jq
choco install -y caffeine
if (Test-Path 'C:\Program Files\Docker\Docker\resources\bin\kubectl.exe') { Remove-Item 'C:\Program Files\Docker\Docker\resources\bin\kubectl.exe' };
- name: Run Integration Test in powershell
shell: powershell
run: |
cd minikube_binaries
New-Item -Force -Path "report" -ItemType Directory
New-Item -Force -Path "testhome" -ItemType Directory
$START_TIME=(GET-DATE)
$env:KUBECONFIG="${pwd}\testhome\kubeconfig"
$env:MINIKUBE_HOME="${pwd}\testhome"
$ErrorActionPreference = "SilentlyContinue"
.\e2e-windows-amd64.exe --minikube-start-args="--driver=docker" --test.timeout=15m --timeout-multiplier=1 --test.v --test.run=TestScheduledStopWindows --binary=./minikube-windows-amd64.exe | Tee-Object -FilePath ".\report\testout.txt"
$END_TIME=(GET-DATE)
echo $END_TIME
$DURATION=(NEW-TIMESPAN -Start $START_TIME -End $END_TIME)
echo $DURATION
$SECS=($DURATION.TotalSeconds)
$MINS=($DURATION.TotalMinutes)
$T_ELAPSED="$MINS m $SECS s"
echo "----"
echo $T_ELAPSED
echo "----"
echo "TIME_ELAPSED=$T_ELAPSED" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
scheduled_stop_hyperv_windows:
needs: [build_minikube]
env:
TIME_ELAPSED: time
JOB_NAME: "scheduled_stop_hyperv_windows"
GOPOGH_RESULT: ""
runs-on: [self-hosted, windows-10-ent, Standard_D16s_v3, hyperv]
steps:
- name: Clean up
continue-on-error: true
shell: powershell
run: |
echo $env:computerName
ls
$ErrorActionPreference = "SilentlyContinue"
cd minikube_binaries
ls
$env:KUBECONFIG="${pwd}\testhome\kubeconfig"
$env:MINIKUBE_HOME="${pwd}\testhome"
.\minikube-windows-amd64.exe delete --all --purge
Get-VM | Where-Object {$_.Name -ne "DockerDesktopVM"} | Foreach {
Stop-VM -Name $_.Name -Force
Remove-VM $_.Name -Force
}
cd ..
Remove-Item minikube_binaries -Force -Recurse
ls
- name: Download Binaries
uses: actions/download-artifact@v1
with:
name: minikube_binaries
- name: Start Docker Desktop
shell: powershell
continue-on-error: true
run: |
$ErrorActionPreference = "SilentlyContinue"
docker ps 2>&1 | Out-Null
$docker_running = $?
if (!$docker_running) {
Write-Output "Starting Docker as an administrator"
Start-Process 'C:/Program Files/Docker/Docker/Docker Desktop.exe' -Verb runAs
}
while (!$docker_running) {
Start-Sleep 5
docker ps 2>&1 | Out-Null
$docker_running = $?
}
Write-Output "Docker is running"
docker system prune -f
- name: Info
continue-on-error: true
shell: powershell
run: |
$ErrorActionPreference = "SilentlyContinue"
cd minikube_binaries
ls
echo $env:computername
Get-WmiObject -class Win32_ComputerSystem
- uses: actions/setup-go@v2
with:
go-version: '1.15.5'
stable: true
- name: Install tools
continue-on-error: true
shell: powershell
run: |
$ErrorActionPreference = "SilentlyContinue"
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
choco install -y kubernetes-cli
choco install -y jq
choco install -y caffeine
if (Test-Path 'C:\Program Files\Docker\Docker\resources\bin\kubectl.exe') { Remove-Item 'C:\Program Files\Docker\Docker\resources\bin\kubectl.exe' };
- name: Run Integration Test in powershell
shell: powershell
run: |
cd minikube_binaries
New-Item -Force -Path "report" -ItemType Directory
New-Item -Force -Path "testhome" -ItemType Directory
$START_TIME=(GET-DATE)
$env:KUBECONFIG="${pwd}\testhome\kubeconfig"
$env:MINIKUBE_HOME="${pwd}\testhome"
$ErrorActionPreference = "SilentlyContinue"
.\e2e-windows-amd64.exe --minikube-start-args="--driver=hyperv" --test.timeout=20m --timeout-multiplier=1.5 --test.v --test.run=TestScheduledStopWindows --binary=./minikube-windows-amd64.exe | Tee-Object -FilePath ".\report\testout.txt"
$END_TIME=(GET-DATE)
echo $END_TIME
$DURATION=(NEW-TIMESPAN -Start $START_TIME -End $END_TIME)
echo $DURATION
$SECS=($DURATION.TotalSeconds)
$MINS=($DURATION.TotalMinutes)
$T_ELAPSED="$MINS m $SECS s"
echo "----"
echo $T_ELAPSED
echo "----"
echo "TIME_ELAPSED=$T_ELAPSED" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
functional_docker_ubuntu_arm64:
needs: [ build_minikube ]
runs-on: [ self-hosted, arm64 ]
Expand Down
Loading

0 comments on commit 6fb41b7

Please sign in to comment.