diff --git a/.kokoro/continuous/acceptance.cfg b/.kokoro/continuous/acceptance.cfg index 96405f5a757e..1782677e96d0 100644 --- a/.kokoro/continuous/acceptance.cfg +++ b/.kokoro/continuous/acceptance.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/.kokoro/nightly/acceptance-newest.cfg b/.kokoro/nightly/acceptance-newest.cfg index 3d280110fcb7..9479c92babaa 100644 --- a/.kokoro/nightly/acceptance-newest.cfg +++ b/.kokoro/nightly/acceptance-newest.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/.kokoro/nightly/acceptance-oldest.cfg b/.kokoro/nightly/acceptance-oldest.cfg index bda8e9283f1d..fce86c62c55d 100644 --- a/.kokoro/nightly/acceptance-oldest.cfg +++ b/.kokoro/nightly/acceptance-oldest.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/.kokoro/presubmit/acceptance.cfg b/.kokoro/presubmit/acceptance.cfg index 9edd7e6a5267..f972e66d1a93 100644 --- a/.kokoro/presubmit/acceptance.cfg +++ b/.kokoro/presubmit/acceptance.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "client-library-test-universe-domain, client-library-test-universe-project-id, client-library-test-universe-storage-location, client-library-test-universe-domain-credential,ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/google-cloud-storage/acceptance/storage/universe_domain_test.rb b/google-cloud-storage/acceptance/storage/universe_domain_test.rb index fc7b93a5bd66..2455ebd7d105 100644 --- a/google-cloud-storage/acceptance/storage/universe_domain_test.rb +++ b/google-cloud-storage/acceptance/storage/universe_domain_test.rb @@ -16,11 +16,16 @@ describe Google::Cloud::Storage, :universe_domain do if ENV["KOKORO_GFILE_DIR"] - # Fetch secret values from the secret_manager path - TEST_UNIVERSE_PROJECT_ID = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-project-id"))) - TEST_UNIVERSE_LOCATION = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-storage-location"))) - TEST_UNIVERSE_DOMAIN = File.read(File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain"))) - TEST_UNIVERSE_DOMAIN_CREDENTIAL = File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain-credential")) + begin + # Fetch secret values from the secret_manager path + TEST_UNIVERSE_PROJECT_ID = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-project-id"))) + TEST_UNIVERSE_LOCATION = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-storage-location"))) + TEST_UNIVERSE_DOMAIN = File.read(File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain"))) + TEST_UNIVERSE_DOMAIN_CREDENTIAL = File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain-credential")) + rescue StandardError => e + puts "Unable to load universe domain secrets: #{e.message}" + next + end let :ud_storage do Google::Cloud::Storage.new(