Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: re-generated to pick up changes from synthtool. (#145)
* ci(java): switch to secret manager from keystore * ci(java): switch to secret manager from keystore, use java-docs-samples user for samples tests * fix: we don't need to supply a service account Source-Author: Jeff Ching <chingor@google.com> Source-Date: Mon Jun 15 11:45:21 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: d1addcdf80aa9ddef8c932c89c919024bbad7af3 Source-Link: googleapis/synthtool@d1addcd * samples(java): fix bad character in samples.cfg from copy/paste Somehow an invisible character was copy/pasted into the file and Kokoro cannot parse the file. Source-Author: Jeff Ching <chingor@google.com> Source-Date: Mon Jun 15 15:42:10 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 6d3eed67a45fd58f9c7bfa173c32e4fd4fed058f Source-Link: googleapis/synthtool@6d3eed6 * ci(java): switch integration test secrets to secret manager Source-Author: Jeff Ching <chingor@google.com> Source-Date: Tue Jun 16 09:26:06 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 6eb80fa9f96433af8dbeb1c8323aa80cda49b374 Source-Link: googleapis/synthtool@6eb80fa * ci(java): fix typo in java integration test secret name Source-Author: BenWhitehead <BenWhitehead@users.noreply.github.com> Source-Date: Tue Jun 16 13:32:19 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: c4f3059c27591eb24d6942a0e357ec94c80459f2 Source-Link: googleapis/synthtool@c4f3059
- Loading branch information
1 parent
3233a4c
commit a12b591
Showing
8 changed files
with
67 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# Copyright 2020 Google LLC. | ||
# | ||
# 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. | ||
|
||
set -eo pipefail | ||
|
||
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} | ||
function msg { println "$*" >&2 ;} | ||
function println { printf '%s\n' "$(now) $*" ;} | ||
|
||
|
||
# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: | ||
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com | ||
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" | ||
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" | ||
mkdir -p ${SECRET_LOCATION} | ||
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") | ||
do | ||
msg "Retrieving secret ${key}" | ||
docker run --entrypoint=gcloud \ | ||
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ | ||
gcr.io/google.com/cloudsdktool/cloud-sdk \ | ||
secrets versions access latest \ | ||
--project cloud-devrel-kokoro-resources \ | ||
--secret ${key} > \ | ||
"${SECRET_LOCATION}/${key}" | ||
if [[ $? == 0 ]]; then | ||
msg "Secret written to ${SECRET_LOCATION}/${key}" | ||
else | ||
msg "Error retrieving secret ${key}" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters