|
| 1 | +# Copyright 2016 The Kubernetes Authors All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +mkdir -p out |
| 16 | +gsutil.cmd cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-amd64.exe out/ |
| 17 | +gsutil.cmd cp gs://minikube-builds/$env:MINIKUBE_LOCATION/localkube out/ |
| 18 | +gsutil.cmd cp gs://minikube-builds/$env:MINIKUBE_LOCATION/e2e-windows-amd64.exe out/ |
| 19 | +gsutil.cmd cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata . |
| 20 | + |
| 21 | +./out/minikube-windows-amd64.exe delete |
| 22 | +Remove-Item -Recurse -Force C:\Users\jenkins\.minikube |
| 23 | + |
| 24 | +out/e2e-windows-amd64.exe -minikube-start-args="--vm-driver=vmware --kubernetes-version=https://storage.googleapis.com/minikube-builds/$env:MINIKUBE_LOCATION/localkube" -minikube-args="--v=10 --logtostderr" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=30m |
| 25 | +$env:result=$lastexitcode |
| 26 | +# If the last exit code was 0->success, x>0->error |
| 27 | +If($env:result -eq 0){$env:status="success"} |
| 28 | +Else {$env:status="failure"} |
| 29 | + |
| 30 | +$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Windows-vmware.txt" |
| 31 | +$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Windows-vmware`"}" |
| 32 | +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 |
| 33 | + |
| 34 | +Exit $env:result |
0 commit comments