ensure Windows integration tests are ephemeral
parent
3ca20f158c
commit
b39f171268
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2021 The Kubernetes Authors All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
$test_root="$env:HOMEDRIVE$env:HOMEPATH\minikube-integration"
|
||||
$test_home="$test_root\$env:COMMIT"
|
||||
$env:KUBECONFIG="$test_home\kubeconfig"
|
||||
$env:MINIKUBE_HOME="$test_home\.minikube"
|
||||
|
||||
mkdir -p $test_home
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2021 The Kubernetes Authors All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
$test_root="$env:HOMEDRIVE$env:HOMEPATH\minikube-integration"
|
||||
$test_home="$test_root\$env:COMMIT"
|
||||
|
||||
rm -r $test_home
|
|
@ -21,6 +21,8 @@ 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 .
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/setup_docker_desktop_windows.ps1 out/
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_integration_setup.ps1 out/
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_integration_teardown.ps1 out/
|
||||
|
||||
$env:SHORT_COMMIT=$env:COMMIT.substring(0, 7)
|
||||
$gcs_bucket="minikube-builds/logs/$env:MINIKUBE_LOCATION/$env:SHORT_COMMIT"
|
||||
|
@ -43,6 +45,8 @@ docker system prune --all --force
|
|||
|
||||
./out/minikube-windows-amd64.exe delete --all
|
||||
|
||||
./out/windows_integration_setup.ps1
|
||||
|
||||
docker ps -aq | ForEach -Process {docker rm -fv $_}
|
||||
|
||||
$started=Get-Date -UFormat %s
|
||||
|
@ -96,4 +100,6 @@ docker system prune --all --force
|
|||
# Just shutdown Docker, it's safer than anything else
|
||||
Get-Process "*Docker Desktop*" | Stop-Process
|
||||
|
||||
./out/windows_integration_teardown.ps1
|
||||
|
||||
Exit $env:result
|
||||
|
|
|
@ -18,9 +18,13 @@ mkdir -p out
|
|||
gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-amd64.exe out/
|
||||
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 .
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_integration_setup.ps1 out/
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_integration_teardown.ps1 out/
|
||||
|
||||
./out/minikube-windows-amd64.exe delete --all
|
||||
|
||||
./out/windows_integration_setup.ps1
|
||||
|
||||
out/e2e-windows-amd64.exe -minikube-start-args="--driver=hyperv" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=65m
|
||||
$env:result=$lastexitcode
|
||||
# If the last exit code was 0->success, x>0->error
|
||||
|
@ -33,4 +37,6 @@ $env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKU
|
|||
$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
|
||||
|
||||
Exit $env:result
|
||||
./out/windows_integration_teardown.ps1
|
||||
|
||||
Exit $env:result
|
||||
|
|
|
@ -19,9 +19,13 @@ mkdir -p out
|
|||
gsutil.cmd -m cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-amd64.exe out/
|
||||
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 .
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_integration_setup.ps1 out/
|
||||
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_integration_teardown.ps1 out/
|
||||
|
||||
./out/minikube-windows-amd64.exe delete
|
||||
|
||||
./out/windows_integration_setup.ps1
|
||||
|
||||
out/e2e-windows-amd64.exe -minikube-start-args="--driver=virtualbox" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=30m
|
||||
$env:result=$lastexitcode
|
||||
# If the last exit code was 0->success, x>0->error
|
||||
|
@ -34,4 +38,6 @@ $env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKU
|
|||
$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
|
||||
|
||||
Exit $env:result
|
||||
./out/windows_integration_teardown.ps1
|
||||
|
||||
Exit $env:result
|
||||
|
|
Loading…
Reference in New Issue