diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index dc7d799123..856136f480 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -321,7 +321,7 @@ touch "${JSON_OUT}" echo ">> Running go test2json" go tool test2json -t < "${TEST_OUT}" > "${JSON_OUT}" || true echo ">> Installing gopogh" -GO111MODULE="on" go get -u github.com/medyagh/gopogh@v0.0.15 || true +GO111MODULE="on" go get -u github.com/medyagh/gopogh@v0.0.16 || true echo ">> Running gopogh" if test -f "${HTML_OUT}"; then rm "${HTML_OUT}" || true # clean up previous runs of same build diff --git a/hack/jenkins/windows_integration_test_hyperv.ps1 b/hack/jenkins/windows_integration_test_hyperv.ps1 index 67732e2339..1c6132e8a7 100644 --- a/hack/jenkins/windows_integration_test_hyperv.ps1 +++ b/hack/jenkins/windows_integration_test_hyperv.ps1 @@ -17,26 +17,24 @@ gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-am gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/e2e-windows-amd64.exe out/ gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata . -./out/minikube-windows-amd64.exe delete +./out/minikube-windows-amd64.exe delete --all --purge out/e2e-windows-amd64.exe --expected-default-driver=hyperv -minikube-start-args="--vm-driver=hyperv --hyperv-virtual-switch=primary-virtual-switch" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=65m > ./out/test.out 2>&1 $env:result=$lastexitcode # If the last exit code was 0->success, x>0->error If($env:result -eq 0){$env:status="success"} Else {$env:status="failure"} -type nul > out/test.json # generate json output using go tool test2json -go tool test2json -t < ./out/test.out > ./out/test.json -GO111MODULE="on" go get -u "github.com/medyagh/gopogh@v0.0.15" - -type nul > out/test.html # touch +cmd /c 'go tool test2json -t < ./out/test.out > ./out/test.json' +$env:GO111MODULE='on' +go get -u "github.com/medyagh/gopogh@v0.0.16" # Generate html report gopogh -in ./out/test.json -out ./out/test.html -name $env:JOB_NAME -pr $env:MINIKUBE_LOCATION -repo github.com/kubernetes/minikube/ -details $env:COMMIT gsutil -qm cp ./out/test.json "gs://minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:JOB_NAME.json" gsutil -qm cp ./out/test.html "gs://minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:JOB_NAME.html" -$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Hyper-V_Windows.txt" +$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:JOB_NAME.html" $json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Hyper-V_Windows`"}" Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing diff --git a/hack/jenkins/windows_integration_test_virtualbox.ps1 b/hack/jenkins/windows_integration_test_virtualbox.ps1 index 86dfde120a..fc757dc1a6 100644 --- a/hack/jenkins/windows_integration_test_virtualbox.ps1 +++ b/hack/jenkins/windows_integration_test_virtualbox.ps1 @@ -17,15 +17,24 @@ gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-am gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/e2e-windows-amd64.exe out/ gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata . -./out/minikube-windows-amd64.exe delete - -out/e2e-windows-amd64.exe -minikube-start-args="--vm-driver=virtualbox" -expected-default-driver=hyperv -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=30m +./out/minikube-windows-amd64.exe delete --all --purge +out/e2e-windows-amd64.exe -minikube-start-args="--vm-driver=virtualbox" -expected-default-driver=hyperv -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=60m > ./out/test.out 2>&1 $env:result=$lastexitcode # If the last exit code was 0->success, x>0->error If($env:result -eq 0){$env:status="success"} Else {$env:status="failure"} -$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/VirtualBox_Windows.txt" +# generate json output using go tool test2json +cmd /c 'go tool test2json -t < ./out/test.out > ./out/test.json' +$env:GO111MODULE='on' +go get -u "github.com/medyagh/gopogh@v0.0.16" +# Generate html report +gopogh -in ./out/test.json -out ./out/test.html -name $env:JOB_NAME -pr $env:MINIKUBE_LOCATION -repo github.com/kubernetes/minikube/ -details $env:COMMIT +gsutil -qm cp ./out/test.json "gs://minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:JOB_NAME.json" +gsutil -qm cp ./out/test.html "gs://minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:JOB_NAME.html" + + +$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:JOB_NAME.html" $json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"VirtualBox_Windows`"}" Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing