@@ -62,32 +62,57 @@ if ($LastExitCode) {
6262. ci/ kokoro/ windows/ lib/ integration.ps1
6363
6464function Invoke-REST-Quickstart {
65- bazelisk $common_flags run $build_flags `
66- // google/ cloud/ storage/ quickstart:quickstart -- `
67- " ${env: GOOGLE_CLOUD_CPP_STORAGE_TEST_BUCKET_NAME} "
68- if ($LastExitCode ) {
69- Write-Host - ForegroundColor Red " bazel run (storage/quickstart) failed with exit code ${LastExitCode} ."
70- Exit ${LastExitCode}
65+ param ($bazel_bin )
66+ try {
67+ $executable = " $bazel_bin /google/cloud/storage/quickstart/quickstart.exe"
68+ Write-Host " Running REST Quickstart, executable found at: $executable "
69+ & $executable " ${env: GOOGLE_CLOUD_CPP_STORAGE_TEST_BUCKET_NAME} "
70+ if ($LastExitCode ) {
71+ Write-Host - ForegroundColor Red " bazel run (storage/quickstart) failed with exit code ${LastExitCode} ."
72+ Exit ${LastExitCode}
73+ }
74+ } catch {
75+ Write-Host - ForegroundColor Red " Caught exception while trying to run storage/quickstart: $_ "
76+ Exit 1
7177 }
7278}
7379
7480function Invoke-gRPC-Quickstart {
75- bazelisk $common_flags run $build_flags `
76- // google/ cloud/ pubsub/ quickstart:quickstart -- `
77- " ${env: GOOGLE_CLOUD_PROJECT} " " ${env: GOOGLE_CLOUD_CPP_PUBSUB_TEST_QUICKSTART_TOPIC} "
78- if ($LastExitCode ) {
79- Write-Host - ForegroundColor Red " bazel run (pubsub/quickstart) failed with exit code ${LastExitCode} ."
80- Exit ${LastExitCode}
81+ param ($bazel_bin )
82+ try {
83+ $executable = " $bazel_bin /google/cloud/pubsub/quickstart/quickstart.exe"
84+ Write-Host " Running gRPC Quickstart, executable found at: $executable "
85+ & $executable " ${env: GOOGLE_CLOUD_PROJECT} " " ${env: GOOGLE_CLOUD_CPP_PUBSUB_TEST_QUICKSTART_TOPIC} "
86+ if ($LastExitCode ) {
87+ Write-Host - ForegroundColor Red " bazel run (pubsub/quickstart) failed with exit code ${LastExitCode} ."
88+ Exit ${LastExitCode}
89+ }
90+ } catch {
91+ Write-Host - ForegroundColor Red " Caught exception while trying to run pubsub/quickstart: $_ "
92+ Exit 1
8193 }
8294}
8395
8496if (Test-Integration - Enabled) {
8597 Write-Host " `n $ ( Get-Date - Format o) Running minimal quickstart prorams"
8698 Install-Roots - Pem
87- ${env: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH} = " ${env: KOKORO_GFILE_DIR} /roots.pem"
88- ${env: GOOGLE_APPLICATION_CREDENTIALS} = " ${env: KOKORO_GFILE_DIR} /kokoro-run-key.json"
89- Invoke-REST - Quickstart
90- Invoke-gRPC - Quickstart
99+ $env: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH = " $env: KOKORO_GFILE_DIR /roots.pem"
100+ $env: CURL_CA_BUNDLE = " $env: KOKORO_GFILE_DIR /roots.pem"
101+ $env: GOOGLE_APPLICATION_CREDENTIALS = " $env: KOKORO_GFILE_DIR /kokoro-run-key.json"
102+ # Troubleshooting output
103+ Write-Host " GOOGLE_APPLICATION_CREDENTIALS=$env: GOOGLE_APPLICATION_CREDENTIALS "
104+ Write-Host " GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=$env: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH "
105+ Write-Host " CURL_CA_BUNDLE=$env: CURL_CA_BUNDLE "
106+ Get-Content " $env: KOKORO_GFILE_DIR /roots.pem" - TotalCount 5
107+
108+ bazelisk $common_flags build $build_flags `
109+ // google/ cloud/ storage/ quickstart:quickstart `
110+ // google/ cloud/ pubsub/ quickstart:quickstart
111+
112+ $bazel_bin = (bazelisk info bazel- bin).Trim()
113+ Write-Host " bazel-bin directory: $bazel_bin "
114+ Invoke-REST - Quickstart $bazel_bin
115+ Invoke-gRPC - Quickstart $bazel_bin
91116}
92117
93118# Shutdown the Bazel server to release any locks
0 commit comments