aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2021-08-13 18:37:08 -0400
committerGitHub <noreply@github.com>2021-08-13 18:37:08 -0400
commitb76f151c669325a44ec3741be221e9b6843ea4e4 (patch)
tree0d95757069d9df1e8c5a9bab7c1944a295cdc988
parentaf37335bd83efa373a5be9f2ef7c22e636c8530c (diff)
downloadgoogle-auth-library-python-b76f151c669325a44ec3741be221e9b6843ea4e4.tar.gz
chore: omit 'docfx' from docs-presubmit build (#831)
We don't have a 'docfx' session in our noxfile (see #822). Further tweak '.kokoro' configuration to get 'Kokoro docs-presubmit' running: - Set up additional 'gfile_resource' in '.kokoro/docs/common.cfg'. - Get 'gcloud' installed in '.kokoro/docker/docs/Dockerfile' - Run 'docs' session with Python 3.8. Closes #797.
-rw-r--r--.kokoro/docker/docs/Dockerfile8
-rw-r--r--.kokoro/docs/common.cfg5
-rw-r--r--.kokoro/docs/docs-presubmit.cfg2
-rw-r--r--noxfile.py2
-rw-r--r--owlbot.py28
5 files changed, 42 insertions, 3 deletions
diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile
index 4e1b1fb..a6bcfc8 100644
--- a/.kokoro/docker/docs/Dockerfile
+++ b/.kokoro/docker/docs/Dockerfile
@@ -64,4 +64,12 @@ RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3.8 /tmp/get-pip.py \
&& rm /tmp/get-pip.py
+# Install gcloud SDK
+RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | \
+ tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
+ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
+ apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
+ && apt-get update -y \
+ && apt-get install python2 google-cloud-sdk -y
+
CMD ["python3.8"]
diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg
index 24c8c89..2118d7d 100644
--- a/.kokoro/docs/common.cfg
+++ b/.kokoro/docs/common.cfg
@@ -10,6 +10,9 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
+# Download resources for system tests (service account key, etc.)
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-auth-library-python"
+
# Use the trampoline script to run in docker.
build_file: "google-auth-library-python/.kokoro/trampoline_v2.sh"
@@ -62,4 +65,4 @@ before_action {
keyname: "docuploader_service_account"
}
}
-} \ No newline at end of file
+}
diff --git a/.kokoro/docs/docs-presubmit.cfg b/.kokoro/docs/docs-presubmit.cfg
index d0f5783..d3f0dea 100644
--- a/.kokoro/docs/docs-presubmit.cfg
+++ b/.kokoro/docs/docs-presubmit.cfg
@@ -24,5 +24,5 @@ env_vars: {
# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
- value: "docs docfx"
+ value: "docs"
}
diff --git a/noxfile.py b/noxfile.py
index d375b03..caeb272 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -142,7 +142,7 @@ def docgen(session):
)
-@nox.session(python="3.7")
+@nox.session(python="3.8")
def docs(session):
"""Build the docs for this library."""
diff --git a/owlbot.py b/owlbot.py
index f692f70..fa03d69 100644
--- a/owlbot.py
+++ b/owlbot.py
@@ -7,11 +7,39 @@ common = gcp.CommonTemplates()
# Add templated files
# ----------------------------------------------------------------------------
templated_files = common.py_library(unit_cov_level=100, cov_level=100)
+
+
s.move(
templated_files / ".kokoro",
excludes=[
"continuous/common.cfg",
+ "docs/common.cfg",
"presubmit/common.cfg",
"build.sh",
],
) # just move kokoro configs
+
+
+assert 1 == s.replace(
+ ".kokoro/docs/docs-presubmit.cfg",
+ 'value: "docs docfx"',
+ 'value: "docs"',
+)
+
+assert 1 == s.replace(
+ ".kokoro/docker/docs/Dockerfile",
+ """\
+CMD \["python3\.8"\]""",
+ """\
+# Install gcloud SDK
+RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | \\
+ tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \\
+ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \\
+ apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \\
+ && apt-get update -y \\
+ && apt-get install python2 google-cloud-sdk -y
+
+CMD ["python3.8"]""",
+)
+
+s.shell.run(["nox", "-s", "blacken"], hide_output=False)