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

Commit c2997fc

Browse filesBrowse files
chore(python): conditionally load credentials in .kokoro/build.sh (#316)
Source-Link: googleapis/synthtool@aa69fb7 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f016446d6e520e5fb552c45b110cba3f217bffdd3d06bdddd076e9e6d13266cf Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 18d0cd2 commit c2997fc
Copy full SHA for c2997fc

File tree

Expand file treeCollapse file tree

2 files changed

+16
-8
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-8
lines changed

‎.github/.OwlBot.lock.yaml

Copy file name to clipboardExpand all lines: .github/.OwlBot.lock.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:fdc038572b896f739f95cc90e62f16c06e4f2ef0ef3bea343a358331862ad0f0
17-
# created: 2025-02-13T21:06:55.521673457Z
16+
digest: sha256:f016446d6e520e5fb552c45b110cba3f217bffdd3d06bdddd076e9e6d13266cf
17+
# created: 2025-02-21T19:32:52.01306189Z

‎.kokoro/build.sh

Copy file name to clipboardExpand all lines: .kokoro/build.sh
+14-6Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
set -eo pipefail
1717

18+
CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}")
19+
1820
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19-
PROJECT_ROOT="github/python-runtimeconfig"
21+
PROJECT_ROOT=$(realpath "${CURRENT_DIR}/..")
2022
fi
2123

22-
cd "${PROJECT_ROOT}"
24+
pushd "${PROJECT_ROOT}"
2325

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

3032
# Setup service account credentials.
31-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
33+
if [[ -f "${KOKORO_GFILE_DIR}/service-account.json" ]]
34+
then
35+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
36+
fi
3237

3338
# Setup project id.
34-
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
39+
if [[ -f "${KOKORO_GFILE_DIR}/project-id.json" ]]
40+
then
41+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
42+
fi
3543

3644
# If this is a continuous build, send the test log to the FlakyBot.
3745
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
@@ -46,7 +54,7 @@ fi
4654
# If NOX_SESSION is set, it only runs the specified session,
4755
# otherwise run all the sessions.
4856
if [[ -n "${NOX_SESSION:-}" ]]; then
49-
python3 -m nox -s ${NOX_SESSION:-}
57+
python3 -m nox -s ${NOX_SESSION:-}
5058
else
51-
python3 -m nox
59+
python3 -m nox
5260
fi

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.