Merge pull request #15944 from spowelljr/moveSetupDockerWindows

CI: Windows Docker setup fixes
pull/15950/head
Steven Powell 2023-03-01 13:39:09 -08:00 committed by GitHub
commit 80f9fdc2fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 9 deletions

View File

@ -41,17 +41,26 @@ gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_cleanup_
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_cleanup_cron.ps1 out/ gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/windows_cleanup_cron.ps1 out/
./out/windows_cleanup_cron.ps1 ./out/windows_cleanup_cron.ps1
# Make sure Docker is up and running # check for Docker CLI
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/setup_docker_desktop_windows.ps1 out/ docker --help
./out/setup_docker_desktop_windows.ps1 if ($lastexitcode -gt 0) {
If ($lastexitcode -gt 0) { echo "Docker CLI not found, exiting."
echo "Docker failed to start, exiting." $json = "{`"state`": `"failure`", `"description`": `"Jenkins: Docker CLI not found`", `"target_url`": `"https://storage.googleapis.com/$gcs_bucket/$env:JOB_NAME.txt`", `"context`": `"$env:JOB_NAME`"}"
Write-GithubStatus -JsonBody $json
Exit $lastexitcode
}
$json = "{`"state`": `"failure`", `"description`": `"Jenkins: docker failed to start`", `"target_url`": `"https://storage.googleapis.com/$gcs_bucket/Hyper-V_Windows.txt`", `"context`": `"$env:JOB_NAME`"}" if ($driver -eq "docker") {
# Make sure Docker is up and running
Write-GithubStatus -JsonBody $json gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/setup_docker_desktop_windows.ps1 out/
./out/setup_docker_desktop_windows.ps1
If ($lastexitcode -gt 0) {
echo "Docker failed to start, exiting."
$json = "{`"state`": `"failure`", `"description`": `"Jenkins: docker failed to start`", `"target_url`": `"https://storage.googleapis.com/$gcs_bucket/$env:JOB_NAME.txt`", `"context`": `"$env:JOB_NAME`"}"
Write-GithubStatus -JsonBody $json
Exit $lastexitcode
}
docker system prune -a --volumes -f docker system prune -a --volumes -f
Exit $lastexitcode
} }
# Download Go # Download Go