Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a849563
changes without context
yoshi-automation Mar 23, 2021
645ec3e
chore(py-library): enable snippet-bot
yoshi-automation Mar 23, 2021
bf3560c
chore(py-library): update decrypt secrets file
yoshi-automation Mar 23, 2021
f984e81
chore(python-library): use sphinx 1.5.5 for the docfx job
yoshi-automation Mar 23, 2021
5e6dc2a
build(python): use release-publish app for notifying GitHub of releas…
yoshi-automation Mar 23, 2021
2dacacf
build(python): add secret manager in kokoro
yoshi-automation Mar 23, 2021
5d5d324
chore(python): add sphinx doctest extension
yoshi-automation Mar 23, 2021
88a4571
chore(python): remove note about editable installs
yoshi-automation Mar 23, 2021
786b49e
chore(python): use BUILD_SPECIFIC_GCLOUD_PROJECT for samples
yoshi-automation Mar 23, 2021
04cf383
chore(python): use 'setup.py' to detect repo root
yoshi-automation Mar 23, 2021
8fc6683
build(python): samples tests should pass if no samples exist
yoshi-automation Mar 23, 2021
9ca4abb
chore(python_library): change the docs bucket name
yoshi-automation Mar 23, 2021
2babfa9
chore(docs): update code of conduct of synthtool and templates
yoshi-automation Mar 23, 2021
618104b
docs: add proto-plus to intersphinx mapping
yoshi-automation Mar 23, 2021
d2e510c
fix(python_library): fix external unit test dependencies
yoshi-automation Mar 23, 2021
e62227d
chore: add type hint check
yoshi-automation Mar 23, 2021
9e099b5
chore: add blacken to template
yoshi-automation Mar 23, 2021
44f90a1
fix: address lint issues
yoshi-automation Mar 23, 2021
accfb41
docs(python): update intersphinx for grpc and auth
yoshi-automation Mar 23, 2021
55ca0d2
docs(python): fix intersphinx link for google-auth
yoshi-automation Mar 23, 2021
8532c66
chore: add config / docs for 'pre-commit' support
yoshi-automation Mar 23, 2021
d5aa2a4
chore(deps): update precommit hook pre-commit/pre-commit-hooks to v3.3.0
yoshi-automation Mar 23, 2021
478b353
test(python): give filesystem paths to pytest-cov
yoshi-automation Mar 23, 2021
e80d3b8
chore: update noxfile.py.j2
yoshi-automation Mar 23, 2021
dcd2d41
chore(deps): update precommit hook pre-commit/pre-commit-hooks to v3.4.0
yoshi-automation Mar 23, 2021
33d7158
docs(python): document adding Python 3.9 support, dropping 3.5 support
yoshi-automation Mar 23, 2021
c479ada
chore: exclude `.nox` directories from linting
yoshi-automation Mar 23, 2021
6ecbf33
chore(python): fix column sizing issue in docs
yoshi-automation Mar 23, 2021
6d3deda
chore(python): use 'http' in LICENSE
yoshi-automation Mar 23, 2021
19ea754
chore(python): skip docfx in main presubmit
yoshi-automation Mar 23, 2021
8d75f79
chore: add missing quotation mark
yoshi-automation Mar 23, 2021
b3a7378
chore: add 3.9 to noxfile template
yoshi-automation Mar 23, 2021
2209949
build(python): make `NOX_SESSION` optional
yoshi-automation Mar 23, 2021
b11b7b3
chore: Add header checker config to python library synth
yoshi-automation Mar 23, 2021
7fc3698
chore: add noxfile parameters for extra dependencies
yoshi-automation Mar 23, 2021
76eeef1
build: migrate to flakybot
yoshi-automation Mar 23, 2021
7f83c91
chore(python): include py.typed files in release
yoshi-automation Mar 23, 2021
9e3a0f1
docs: update python contributing guide
yoshi-automation Mar 23, 2021
74d8354
build(python): enable flakybot on library unit and system tests
yoshi-automation Mar 23, 2021
e6aa96e
test: install pyopenssl for mtls testing
yoshi-automation Mar 23, 2021
baeabe6
chore: add pre-commit-config to renovate ignore paths
yoshi-automation Mar 23, 2021
3bc4b88
build(python): fail nox sessions if a python version is missing
yoshi-automation Mar 23, 2021
34f5360
chore(python): add kokoro configs for periodic builds against head
yoshi-automation Mar 23, 2021
6e3d5ae
chore(deps): update precommit hook pycqa/flake8 to v3.9.0
yoshi-automation Mar 23, 2021
8685dee
test(python): use constraints files to check dependency lower bounds
yoshi-automation Mar 23, 2021
1806034
fix: fix namespacing
busunkim96 Apr 2, 2021
d814c6f
fix: keep attribute
busunkim96 Apr 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build(python): add secret manager in kokoro
Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Wed Sep 16 10:24:40 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: dba48bb9bc6959c232bec9150ac6313b608fe7bd
Source-Link: googleapis/synthtool@dba48bb
  • Loading branch information
yoshi-automation committed Mar 23, 2021
commit 2dacacfefefd4ad44acf62a0e9e3ff30501b7134
43 changes: 43 additions & 0 deletions .kokoro/populate-secrets.sh
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
15 changes: 10 additions & 5 deletions .kokoro/trampoline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@

set -eo pipefail

python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$?
# Always run the cleanup script, regardless of the success of bouncing into
# the container.
function cleanup() {
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
echo "cleanup";
}
trap cleanup EXIT

chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true

exit ${ret_code}
$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"
5 changes: 3 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "257fda18168bedb76985024bd198ed1725485488"
"sha": "dba48bb9bc6959c232bec9150ac6313b608fe7bd"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "257fda18168bedb76985024bd198ed1725485488"
"sha": "dba48bb9bc6959c232bec9150ac6313b608fe7bd"
}
}
],
Expand Down Expand Up @@ -69,6 +69,7 @@
".kokoro/docs/common.cfg",
".kokoro/docs/docs-presubmit.cfg",
".kokoro/docs/docs.cfg",
".kokoro/populate-secrets.sh",
".kokoro/presubmit/common.cfg",
".kokoro/presubmit/presubmit.cfg",
".kokoro/publish-docs.sh",
Expand Down