From 6d12ca7e5cdc91b0fa9ad187226751029589a96b Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Fri, 15 May 2020 17:20:33 -0700 Subject: [PATCH 1/9] Fix node start --- cmd/minikube/cmd/node_start.go | 13 ++++++++----- cmd/minikube/cmd/node_stop.go | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/minikube/cmd/node_start.go b/cmd/minikube/cmd/node_start.go index 7399e87123..4710599c93 100644 --- a/cmd/minikube/cmd/node_start.go +++ b/cmd/minikube/cmd/node_start.go @@ -20,6 +20,7 @@ import ( "os" "github.com/spf13/cobra" + "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/mustload" @@ -39,16 +40,17 @@ var nodeStartCmd = &cobra.Command{ api, cc := mustload.Partial(ClusterFlagValue()) name := args[0] - if machine.IsRunning(api, name) { - out.T(out.Check, "{{.name}} is already running", out.V{"name": name}) - os.Exit(0) - } - n, _, err := node.Retrieve(cc, name) if err != nil { exit.WithError("retrieving node", err) } + machineName := driver.MachineName(*cc, *n) + if machine.IsRunning(api, machineName) { + out.T(out.Check, "{{.name}} is already running", out.V{"name": name}) + os.Exit(0) + } + r, p, m, h, err := node.Provision(cc, n, false) if err != nil { exit.WithError("provisioning host for node", err) @@ -71,6 +73,7 @@ var nodeStartCmd = &cobra.Command{ exit.WithError("failed to start node", err) } } + out.T(out.Happy, "Successfully started node {{.name}}!", out.V{"name": machineName}) }, } diff --git a/cmd/minikube/cmd/node_stop.go b/cmd/minikube/cmd/node_stop.go index 3f5c8d7433..771f293bea 100644 --- a/cmd/minikube/cmd/node_stop.go +++ b/cmd/minikube/cmd/node_stop.go @@ -49,6 +49,7 @@ var nodeStopCmd = &cobra.Command{ if err != nil { out.FatalT("Failed to stop node {{.name}}", out.V{"name": name}) } + out.T(out.Stopped, "Successfully stopped node {{.name}}", out.V{"name": machineName}) }, } From 9144e6e49253f66cee4b1f4021f27b47d76d2b93 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:19:38 -0700 Subject: [PATCH 2/9] build windows binaries in PR --- .github/workflows/pr.yml | 180 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index aedcfed781..b7955d8a7b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,6 +20,8 @@ jobs: run: | make minikube-linux-amd64 make e2e-linux-amd64 + make windows + make e2e-windows-amd64.exe cp -r test/integration/testdata ./out whoami echo github ref $GITHUB_REF @@ -156,6 +158,184 @@ jobs: numPass=$(echo $STAT | jq '.NumberOfPass') echo "*** $numPass Passed ***" if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi + # They will run in parallel and use the binaries in previous step + functional_test_docker_windows: + needs: [build_minikube] + env: + TIME_ELAPSED: time + JOB_NAME: "functional_test_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" + Remove-Item minikube_binaries -Force -Recurse + ls + - name: Download Binaries + uses: actions/download-artifact@v1 + with: + name: minikube_binaries + - name: Info + shell: powershell + run: | + echo $env:computername + echo "------------------------" + docker info + echo "------------------------" + docker volume ls + echo "------------------------" + - name: Run Integration Test in powershell + continue-on-error: true + 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII + $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" + - name: Generate HTML Report + continue-on-error: true + shell: powershell + run: | + cd minikube_binaries + Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII + $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") + echo status: ${STAT} + $FailNum=$(echo $STAT | jq '.NumberOfFail') + $TestsNum=$(echo $STAT | jq '.NumberOfTests') + $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" + echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" + echo "::set-env name=STAT::${STAT}" + echo ${GOPOGH_RESULT} + $numFail=(echo $STAT | jq '.NumberOfFail') + $failedTests=( echo $STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTest + echo "-------------------------------------------------------" + $numPass=$(echo $STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + - uses: actions/upload-artifact@v1 + with: + name: functional_test_docker_windows + path: minikube_binaries/report + - name: The End Result functional_test_docker_windows + shell: powershell + run: | + $numFail=(echo $Env:STAT | jq '.NumberOfFail') + $failedTests=( echo $Env:STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTests + echo "-------------------------------------------------------" + $numPass=$(echo $Env:STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } + If ($numPass -eq 0){ exit 2 } + functional_test_hyperv_windows: + needs: [build_minikube] + env: + TIME_ELAPSED: time + JOB_NAME: "functional_test_hyperv_windows" + GOPOGH_RESULT: "" + runs-on: [self-hosted, windows-10-ent, 16CPUs] + steps: + - name: Clean up + continue-on-error: true + shell: powershell + run: | + echo $env:computerName + ls + $ErrorActionPreference = "SilentlyContinue" + Remove-Item minikube_binaries -Force -Recurse + ls + - name: Download Binaries + uses: actions/download-artifact@v1 + with: + name: minikube_binaries + - name: Info + shell: powershell + run: | + echo $env:computername + Get-WmiObject -class Win32_ComputerSystem + - name: Run Integration Test in powershell + continue-on-error: true + 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII + $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" + - name: Generate HTML Report + continue-on-error: true + shell: powershell + run: | + cd minikube_binaries + Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII + $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") + echo status: ${STAT} + $FailNum=$(echo $STAT | jq '.NumberOfFail') + $TestsNum=$(echo $STAT | jq '.NumberOfTests') + $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" + echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" + echo "::set-env name=STAT::${STAT}" + echo ${GOPOGH_RESULT} + $numFail=(echo $STAT | jq '.NumberOfFail') + $failedTests=( echo $STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTest + echo "-------------------------------------------------------" + $numPass=$(echo $STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + - uses: actions/upload-artifact@v1 + with: + name: functional_test_hyperv_windows + path: minikube_binaries/report + - name: The End Result functional_test_hyperv_windows + shell: powershell + run: | + $numFail=(echo $Env:STAT | jq '.NumberOfFail') + $failedTests=( echo $Env:STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTests + echo "-------------------------------------------------------" + $numPass=$(echo $Env:STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } + If ($numPass -eq 0){ exit 2 } addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: From 8154c04ffda340f59404ebce668d2e6a784ea0b0 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:20:37 -0700 Subject: [PATCH 3/9] build windows binaries in Master GH --- .github/workflows/master.yml | 2 + .github/workflows/pr.yml | 178 ----------------------------------- 2 files changed, 2 insertions(+), 178 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a0a8657c8e..72fab39204 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -22,6 +22,8 @@ jobs: run: | make minikube-linux-amd64 make e2e-linux-amd64 + make windows + make e2e-windows-amd64.exe cp -r test/integration/testdata ./out whoami echo github ref $GITHUB_REF diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b7955d8a7b..c47f08b66b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -158,184 +158,6 @@ jobs: numPass=$(echo $STAT | jq '.NumberOfPass') echo "*** $numPass Passed ***" if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi - # They will run in parallel and use the binaries in previous step - functional_test_docker_windows: - needs: [build_minikube] - env: - TIME_ELAPSED: time - JOB_NAME: "functional_test_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" - Remove-Item minikube_binaries -Force -Recurse - ls - - name: Download Binaries - uses: actions/download-artifact@v1 - with: - name: minikube_binaries - - name: Info - shell: powershell - run: | - echo $env:computername - echo "------------------------" - docker info - echo "------------------------" - docker volume ls - echo "------------------------" - - name: Run Integration Test in powershell - continue-on-error: true - 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII - $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" - - name: Generate HTML Report - continue-on-error: true - shell: powershell - run: | - cd minikube_binaries - Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII - $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") - echo status: ${STAT} - $FailNum=$(echo $STAT | jq '.NumberOfFail') - $TestsNum=$(echo $STAT | jq '.NumberOfTests') - $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" - echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" - echo "::set-env name=STAT::${STAT}" - echo ${GOPOGH_RESULT} - $numFail=(echo $STAT | jq '.NumberOfFail') - $failedTests=( echo $STAT | jq '.FailedTests') - echo "----------------${numFail} Failures----------------------------" - echo $failedTest - echo "-------------------------------------------------------" - $numPass=$(echo $STAT | jq '.NumberOfPass') - echo "*** $numPass Passed ***" - - uses: actions/upload-artifact@v1 - with: - name: functional_test_docker_windows - path: minikube_binaries/report - - name: The End Result functional_test_docker_windows - shell: powershell - run: | - $numFail=(echo $Env:STAT | jq '.NumberOfFail') - $failedTests=( echo $Env:STAT | jq '.FailedTests') - echo "----------------${numFail} Failures----------------------------" - echo $failedTests - echo "-------------------------------------------------------" - $numPass=$(echo $Env:STAT | jq '.NumberOfPass') - echo "*** $numPass Passed ***" - If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } - If ($numPass -eq 0){ exit 2 } - functional_test_hyperv_windows: - needs: [build_minikube] - env: - TIME_ELAPSED: time - JOB_NAME: "functional_test_hyperv_windows" - GOPOGH_RESULT: "" - runs-on: [self-hosted, windows-10-ent, 16CPUs] - steps: - - name: Clean up - continue-on-error: true - shell: powershell - run: | - echo $env:computerName - ls - $ErrorActionPreference = "SilentlyContinue" - Remove-Item minikube_binaries -Force -Recurse - ls - - name: Download Binaries - uses: actions/download-artifact@v1 - with: - name: minikube_binaries - - name: Info - shell: powershell - run: | - echo $env:computername - Get-WmiObject -class Win32_ComputerSystem - - name: Run Integration Test in powershell - continue-on-error: true - 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII - $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" - - name: Generate HTML Report - continue-on-error: true - shell: powershell - run: | - cd minikube_binaries - Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII - $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") - echo status: ${STAT} - $FailNum=$(echo $STAT | jq '.NumberOfFail') - $TestsNum=$(echo $STAT | jq '.NumberOfTests') - $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" - echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" - echo "::set-env name=STAT::${STAT}" - echo ${GOPOGH_RESULT} - $numFail=(echo $STAT | jq '.NumberOfFail') - $failedTests=( echo $STAT | jq '.FailedTests') - echo "----------------${numFail} Failures----------------------------" - echo $failedTest - echo "-------------------------------------------------------" - $numPass=$(echo $STAT | jq '.NumberOfPass') - echo "*** $numPass Passed ***" - - uses: actions/upload-artifact@v1 - with: - name: functional_test_hyperv_windows - path: minikube_binaries/report - - name: The End Result functional_test_hyperv_windows - shell: powershell - run: | - $numFail=(echo $Env:STAT | jq '.NumberOfFail') - $failedTests=( echo $Env:STAT | jq '.FailedTests') - echo "----------------${numFail} Failures----------------------------" - echo $failedTests - echo "-------------------------------------------------------" - $numPass=$(echo $Env:STAT | jq '.NumberOfPass') - echo "*** $numPass Passed ***" - If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } - If ($numPass -eq 0){ exit 2 } addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: From aba430ffd6a652ce83f9e1efbdb0b54c3da3d7be Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:22:11 -0700 Subject: [PATCH 4/9] add functional docker windows test to gh action --- .github/workflows/master.yml | 91 ++++++++++++++++++++++++++++++++++++ .github/workflows/pr.yml | 91 ++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 72fab39204..32f4cd236d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -160,6 +160,97 @@ jobs: numPass=$(echo $STAT | jq '.NumberOfPass') echo "*** $numPass Passed ***" if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi + functional_test_docker_windows: + needs: [build_minikube] + env: + TIME_ELAPSED: time + JOB_NAME: "functional_test_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" + Remove-Item minikube_binaries -Force -Recurse + ls + - name: Download Binaries + uses: actions/download-artifact@v1 + with: + name: minikube_binaries + - name: Info + shell: powershell + run: | + echo $env:computername + echo "------------------------" + docker info + echo "------------------------" + docker volume ls + echo "------------------------" + - name: Run Integration Test in powershell + continue-on-error: true + 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII + $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" + - name: Generate HTML Report + continue-on-error: true + shell: powershell + run: | + cd minikube_binaries + Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII + $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") + echo status: ${STAT} + $FailNum=$(echo $STAT | jq '.NumberOfFail') + $TestsNum=$(echo $STAT | jq '.NumberOfTests') + $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" + echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" + echo "::set-env name=STAT::${STAT}" + echo ${GOPOGH_RESULT} + $numFail=(echo $STAT | jq '.NumberOfFail') + $failedTests=( echo $STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTest + echo "-------------------------------------------------------" + $numPass=$(echo $STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + - uses: actions/upload-artifact@v1 + with: + name: functional_test_docker_windows + path: minikube_binaries/report + - name: The End Result functional_test_docker_windows + shell: powershell + run: | + $numFail=(echo $Env:STAT | jq '.NumberOfFail') + $failedTests=( echo $Env:STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTests + echo "-------------------------------------------------------" + $numPass=$(echo $Env:STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } + If ($numPass -eq 0){ exit 2 } addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c47f08b66b..40c3de71b0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -158,6 +158,97 @@ jobs: numPass=$(echo $STAT | jq '.NumberOfPass') echo "*** $numPass Passed ***" if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi + functional_test_docker_windows: + needs: [build_minikube] + env: + TIME_ELAPSED: time + JOB_NAME: "functional_test_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" + Remove-Item minikube_binaries -Force -Recurse + ls + - name: Download Binaries + uses: actions/download-artifact@v1 + with: + name: minikube_binaries + - name: Info + shell: powershell + run: | + echo $env:computername + echo "------------------------" + docker info + echo "------------------------" + docker volume ls + echo "------------------------" + - name: Run Integration Test in powershell + continue-on-error: true + 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII + $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" + - name: Generate HTML Report + continue-on-error: true + shell: powershell + run: | + cd minikube_binaries + Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII + $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") + echo status: ${STAT} + $FailNum=$(echo $STAT | jq '.NumberOfFail') + $TestsNum=$(echo $STAT | jq '.NumberOfTests') + $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" + echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" + echo "::set-env name=STAT::${STAT}" + echo ${GOPOGH_RESULT} + $numFail=(echo $STAT | jq '.NumberOfFail') + $failedTests=( echo $STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTest + echo "-------------------------------------------------------" + $numPass=$(echo $STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + - uses: actions/upload-artifact@v1 + with: + name: functional_test_docker_windows + path: minikube_binaries/report + - name: The End Result functional_test_docker_windows + shell: powershell + run: | + $numFail=(echo $Env:STAT | jq '.NumberOfFail') + $failedTests=( echo $Env:STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTests + echo "-------------------------------------------------------" + $numPass=$(echo $Env:STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } + If ($numPass -eq 0){ exit 2 } addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: From 2a46ba721cc4d70b32ab8f4cbbbaff1ab878eef1 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:27:43 -0700 Subject: [PATCH 5/9] add hyperv to pr --- .github/workflows/master.yml | 1 + .github/workflows/pr.yml | 86 ++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 32f4cd236d..ad750bd094 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -251,6 +251,7 @@ jobs: echo "*** $numPass Passed ***" If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } If ($numPass -eq 0){ exit 2 } + addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 40c3de71b0..5ae6bf0779 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -249,6 +249,92 @@ jobs: echo "*** $numPass Passed ***" If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } If ($numPass -eq 0){ exit 2 } + functional_test_hyperv_windows: + needs: [build_minikube] + env: + TIME_ELAPSED: time + JOB_NAME: "functional_test_hyperv_windows" + GOPOGH_RESULT: "" + runs-on: [self-hosted, windows-10-ent, 16CPUs] + steps: + - name: Clean up + continue-on-error: true + shell: powershell + run: | + echo $env:computerName + ls + $ErrorActionPreference = "SilentlyContinue" + Remove-Item minikube_binaries -Force -Recurse + ls + - name: Download Binaries + uses: actions/download-artifact@v1 + with: + name: minikube_binaries + - name: Info + shell: powershell + run: | + echo $env:computername + Get-WmiObject -class Win32_ComputerSystem + - name: Run Integration Test in powershell + continue-on-error: true + 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII + $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" + - name: Generate HTML Report + continue-on-error: true + shell: powershell + run: | + cd minikube_binaries + Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII + $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") + echo status: ${STAT} + $FailNum=$(echo $STAT | jq '.NumberOfFail') + $TestsNum=$(echo $STAT | jq '.NumberOfTests') + $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" + echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" + echo "::set-env name=STAT::${STAT}" + echo ${GOPOGH_RESULT} + $numFail=(echo $STAT | jq '.NumberOfFail') + $failedTests=( echo $STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTest + echo "-------------------------------------------------------" + $numPass=$(echo $STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + - uses: actions/upload-artifact@v1 + with: + name: functional_test_hyperv_windows + path: minikube_binaries/report + - name: The End Result functional_test_hyperv_windows + shell: powershell + run: | + $numFail=(echo $Env:STAT | jq '.NumberOfFail') + $failedTests=( echo $Env:STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTests + echo "-------------------------------------------------------" + $numPass=$(echo $Env:STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } + If ($numPass -eq 0){ exit 2 } addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: From cd3adeb45deef1e3b60d87797483fd8fcd6f61c8 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:28:16 -0700 Subject: [PATCH 6/9] add hyperv to master --- .github/workflows/master.yml | 87 +++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ad750bd094..ba5eac7ab2 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -251,7 +251,92 @@ jobs: echo "*** $numPass Passed ***" If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } If ($numPass -eq 0){ exit 2 } - + functional_test_hyperv_windows: + needs: [build_minikube] + env: + TIME_ELAPSED: time + JOB_NAME: "functional_test_hyperv_windows" + GOPOGH_RESULT: "" + runs-on: [self-hosted, windows-10-ent, 16CPUs] + steps: + - name: Clean up + continue-on-error: true + shell: powershell + run: | + echo $env:computerName + ls + $ErrorActionPreference = "SilentlyContinue" + Remove-Item minikube_binaries -Force -Recurse + ls + - name: Download Binaries + uses: actions/download-artifact@v1 + with: + name: minikube_binaries + - name: Info + shell: powershell + run: | + echo $env:computername + Get-WmiObject -class Win32_ComputerSystem + - name: Run Integration Test in powershell + continue-on-error: true + 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=13m --test.v --test.run=TestFunctional --binary="./minikube-windows-amd64.exe" | Out-File -FilePath .\report\testout.txt -Encoding ASCII + $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 "::set-env name=TIME_ELAPSED::$T_ELAPSED" + - name: Generate HTML Report + continue-on-error: true + shell: powershell + run: | + cd minikube_binaries + Get-Content .\report\testout.txt | go tool test2json -t | Out-File -FilePath .\report\testout.json -Encoding ASCII + $STAT=(gopogh -in .\report\testout.json -out .\report\testout.html -name "${Env:JOB_NAME} ${Env:GITHUB_REF}" -repo "${Env:GITHUB_REPOSITORY}" -details "${Env:GITHUB_SHA}") + echo status: ${STAT} + $FailNum=$(echo $STAT | jq '.NumberOfFail') + $TestsNum=$(echo $STAT | jq '.NumberOfTests') + $GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${Env:TIME_ELAPSED}" + echo "::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}" + echo "::set-env name=STAT::${STAT}" + echo ${GOPOGH_RESULT} + $numFail=(echo $STAT | jq '.NumberOfFail') + $failedTests=( echo $STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTest + echo "-------------------------------------------------------" + $numPass=$(echo $STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + - uses: actions/upload-artifact@v1 + with: + name: functional_test_hyperv_windows + path: minikube_binaries/report + - name: The End Result functional_test_hyperv_windows + shell: powershell + run: | + $numFail=(echo $Env:STAT | jq '.NumberOfFail') + $failedTests=( echo $Env:STAT | jq '.FailedTests') + echo "----------------${numFail} Failures----------------------------" + echo $failedTests + echo "-------------------------------------------------------" + $numPass=$(echo $Env:STAT | jq '.NumberOfPass') + echo "*** $numPass Passed ***" + If ($numFail -ge 0){ exit 2 } else { echo "goodjob" } + If ($numPass -eq 0){ exit 2 } addons_certs_tests_docker_ubuntu: runs-on: ubuntu-18.04 env: From 56ee40f48fbf4e256bdc85cc6644fe9fb6c6c68c Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:30:04 -0700 Subject: [PATCH 7/9] add copy windows test to all report --- .github/workflows/master.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ba5eac7ab2..a6c72097bc 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -702,6 +702,8 @@ jobs: multinode_pause_tests_docker_ubuntu, preload_docker_flags_tests_docker_ubuntu, functional_baremetal_ubuntu18_04, + functional_test_docker_windows, + functional_test_hyperv_windows, ] runs-on: ubuntu-18.04 steps: @@ -718,6 +720,8 @@ jobs: cp -r ./multinode_pause_tests_docker_ubuntu ./all_reports/ cp -r ./preload_docker_flags_tests_docker_ubuntu ./all_reports/ cp -r ./functional_baremetal_ubuntu18_04 ./all_reports/ + cp -r ./functional_test_docker_windows ./all_reports/ + cp -r ./functional_test_hyperv_windows ./all_reports/ - uses: actions/upload-artifact@v1 with: name: all_reports From 1c8c64700657b5d648531d8110f0c038b25ede15 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:30:27 -0700 Subject: [PATCH 8/9] add copy windows to PR all report --- .github/workflows/pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5ae6bf0779..c87b4cfce2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -716,6 +716,8 @@ jobs: cp -r ./multinode_pause_tests_docker_ubuntu ./all_reports/ cp -r ./preload_docker_flags_tests_docker_ubuntu ./all_reports/ cp -r ./functional_baremetal_ubuntu18_04 ./all_reports/ + cp -r ./functional_test_docker_windows ./all_reports/ + cp -r ./functional_test_hyperv_windows ./all_reports/ - uses: actions/upload-artifact@v1 with: name: all_reports From 87114c242e0a26e7d13ab4942c04d01304674503 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 18 May 2020 13:30:51 -0700 Subject: [PATCH 9/9] add dependecy for PR jobs steps --- .github/workflows/pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c87b4cfce2..a545e381a7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -700,6 +700,8 @@ jobs: multinode_pause_tests_docker_ubuntu, preload_docker_flags_tests_docker_ubuntu, functional_baremetal_ubuntu18_04, + functional_test_docker_windows, + functional_test_hyperv_windows, ] runs-on: ubuntu-18.04 steps: