From b4feeb6188df86fd788eea073a60e6a9ed8726da Mon Sep 17 00:00:00 2001 From: Graham Paye Date: Thu, 4 Apr 2019 13:20:58 -0700 Subject: [PATCH] setup windows builds to track google-cloud-ruby (#209) --- .kokoro/build.bat | 10 +++++++++- .kokoro/continuous/windows.cfg | 18 +++++++++++++++++- .kokoro/presubmit/windows.cfg | 18 +++++++++++++++++- .kokoro/trampoline.bat | 10 ++++++++++ .kokoro/windows.sh | 4 ---- 5 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 .kokoro/trampoline.bat delete mode 100644 .kokoro/windows.sh diff --git a/.kokoro/build.bat b/.kokoro/build.bat index ba3fdbc..5ff89c8 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -5,4 +5,12 @@ REM * Merges run all non-acceptance tests for every library, and acceptance tes REM * Nightlies run all acceptance tests for every library. REM Currently only runs tests on 2.5.1 -"C:\Program Files\Git\bin\bash.exe" github/google-auth-library-ruby/.kokoro/windows.sh +SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/build.bat" + +SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-build.bat" + +SET EXIT_STATUS=1 + +%download% && master-build.bat && SET EXIT_STATUS=0 + +EXIT %EXIT_STATUS% diff --git a/.kokoro/continuous/windows.cfg b/.kokoro/continuous/windows.cfg index 8a73e4e..ff953f8 100644 --- a/.kokoro/continuous/windows.cfg +++ b/.kokoro/continuous/windows.cfg @@ -1,3 +1,19 @@ # Format: //devtools/kokoro/config/proto/build.proto -build_file: "google-auth-library-ruby/.kokoro/build.bat" +build_file: "google-auth-library-ruby/.kokoro/trampoline.bat" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/windows" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-auth-library-ruby/.kokoro/build.bat" +} + +env_vars: { + key: "REPO_DIR" + value: "google-auth-library-ruby" +} diff --git a/.kokoro/presubmit/windows.cfg b/.kokoro/presubmit/windows.cfg index 8a73e4e..ff953f8 100644 --- a/.kokoro/presubmit/windows.cfg +++ b/.kokoro/presubmit/windows.cfg @@ -1,3 +1,19 @@ # Format: //devtools/kokoro/config/proto/build.proto -build_file: "google-auth-library-ruby/.kokoro/build.bat" +build_file: "google-auth-library-ruby/.kokoro/trampoline.bat" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/windows" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-auth-library-ruby/.kokoro/build.bat" +} + +env_vars: { + key: "REPO_DIR" + value: "google-auth-library-ruby" +} diff --git a/.kokoro/trampoline.bat b/.kokoro/trampoline.bat new file mode 100644 index 0000000..1634b07 --- /dev/null +++ b/.kokoro/trampoline.bat @@ -0,0 +1,10 @@ + +SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/trampoline.bat" + +SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-trampoline.bat" + +SET EXIT_STATUS=1 + +%download% && master-trampoline.bat && SET EXIT_STATUS=0 + +EXIT %EXIT_STATUS% diff --git a/.kokoro/windows.sh b/.kokoro/windows.sh deleted file mode 100644 index 68b09f4..0000000 --- a/.kokoro/windows.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -script_url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/windows.sh" -curl -o master-windows.sh $script_url && source master-windows.sh