Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

chore(python): conditionally load credentials in .kokoro/build.sh #798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions 4 .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:04c35dc5f49f0f503a306397d6d043685f8d2bb822ab515818c4208d7fb2db3a
# created: 2025-01-16T15:24:11.364245182Z
digest: sha256:f016446d6e520e5fb552c45b110cba3f217bffdd3d06bdddd076e9e6d13266cf
# created: 2025-02-21T19:32:52.01306189Z
20 changes: 14 additions & 6 deletions 20 .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@

set -eo pipefail

CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}")

if [[ -z "${PROJECT_ROOT:-}" ]]; then
PROJECT_ROOT="github/python-api-core"
PROJECT_ROOT=$(realpath "${CURRENT_DIR}/..")
fi

cd "${PROJECT_ROOT}"
pushd "${PROJECT_ROOT}"

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1
Expand All @@ -28,10 +30,16 @@ export PYTHONUNBUFFERED=1
env | grep KOKORO

# Setup service account credentials.
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
if [[ -f "${KOKORO_GFILE_DIR}/service-account.json" ]]
then
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
fi

# Setup project id.
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
if [[ -f "${KOKORO_GFILE_DIR}/project-id.json" ]]
then
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
fi

# If this is a continuous build, send the test log to the FlakyBot.
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
Expand All @@ -46,7 +54,7 @@ fi
# If NOX_SESSION is set, it only runs the specified session,
# otherwise run all the sessions.
if [[ -n "${NOX_SESSION:-}" ]]; then
python3 -m nox -s ${NOX_SESSION:-}
python3 -m nox -s ${NOX_SESSION:-}
else
python3 -m nox
python3 -m nox
fi
Morty Proxy This is a proxified and sanitized view of the page, visit original site.