schedule stop in verfied

pull/11143/head
Medya Gh 2021-04-19 12:45:37 -07:00
parent d6774860e9
commit 99d9c500c5
3 changed files with 192 additions and 384 deletions

View File

@ -559,198 +559,6 @@ jobs:
If ($numPass -eq 0){ exit 2 }
If ($numPass -lt 33){ exit 2 }
If ($numFail -eq 0){ exit 0 }
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: ${{env.GO_VERSION}}
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: ${{env.GO_VERSION}}
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_baremetal_ubuntu18_04:
needs: [build_minikube]
env:

View File

@ -557,198 +557,6 @@ jobs:
If ($numPass -eq 0){ exit 2 }
If ($numPass -lt 33){ exit 2 }
If ($numFail -eq 0){ exit 0 }
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: ${{env.GO_VERSION}}
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: ${{env.GO_VERSION}}
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_baremetal_ubuntu18_04:
needs: [build_minikube]
env:

View File

@ -802,6 +802,198 @@ jobs:
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
if [ "$numPass" -lt 9 ];then echo "*** Failed to pass at least 9 ! ***";exit 2;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: ${{env.GO_VERSION}}
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: ${{env.GO_VERSION}}
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
# After all integration tests finished
# collect all the reports and upload them
upload_all_reports: