Skip to content

Commit

Permalink
exclude .kokoro/build.sh from templates; restore nox install command …
Browse files Browse the repository at this point in the history
…in .kokoro/build.sh
  • Loading branch information
parthea committed Mar 22, 2024
1 parent ba115a3 commit ae6bc9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
# Setup project id.
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")

# Install nox
python3 -m pip install --upgrade --quiet nox

# 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.
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
Expand Down
32 changes: 2 additions & 30 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""This script is used to synthesize generated parts of this library."""

import pathlib
import re

import synthtool as s
from synthtool import gcp
Expand Down Expand Up @@ -57,6 +56,8 @@
"docs/multiprocessing.rst",
"noxfile.py",
"README.rst",
# exclude .kokoro/build.sh which is customized due to support for conda
".kokoro/build.sh",
],
)

Expand All @@ -68,35 +69,6 @@
[".github/header-checker-lint.yml"], '"Google LLC"', '"pandas-gbq Authors"',
)

# Work around bug in templates https://github.com/googleapis/synthtool/pull/1335
s.replace(".github/workflows/unittest.yml", "--fail-under=100", "--fail-under=96")

# Add environment variables to build.sh to support conda virtualenv
# installations
s.replace(
[".kokoro/build.sh"],
"export PYTHONUNBUFFERED=1",
r"""export PYTHONUNBUFFERED=1
export CONDA_EXE=/root/conda/bin/conda
export CONDA_PREFIX=/root/conda
export CONDA_PROMPT_MODIFIER=(base)
export _CE_CONDA=
export CONDA_SHLVL=1
export CONDA_PYTHON_EXE=/root/conda/bin/python
export CONDA_DEFAULT_ENV=base
export PATH=/root/conda/bin:/root/conda/condabin:${PATH}
""",
)


# Enable display of all environmental variables, not just KOKORO related vars
s.replace(
[".kokoro/build.sh"],
r"env \| grep KOKORO",
"env",
)


# ----------------------------------------------------------------------------
# Samples templates
# ----------------------------------------------------------------------------
Expand Down

0 comments on commit ae6bc9b

Please sign in to comment.