Skip to content

Commit b316a6a

Browse files
authored
build: fix docs build (googleapis#12965)
This PR fixes the docs build which started failing as of googleapis#12634 and googleapis#12881. I tested these changes by re-triggering a docs build which previously failed, with the changes from this PR. See related PR googleapis/synthtool#1996 and related issue b/356444150
1 parent 60d0728 commit b316a6a

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

.kokoro/docker/docs/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,11 @@ RUN tar -xvf Python-3.10.14.tgz
7171
RUN ./Python-3.10.14/configure --enable-optimizations
7272
RUN make altinstall
7373

74-
RUN python3.10 -m venv /venv
75-
ENV PATH /venv/bin:$PATH
74+
ENV PATH /usr/local/bin/python3.10:$PATH
7675

7776
###################### Install pip
7877
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
79-
&& python3 /tmp/get-pip.py \
78+
&& python3.10 /tmp/get-pip.py \
8079
&& rm /tmp/get-pip.py
8180

8281
# Test pip

.kokoro/publish-docs-single.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@ pwd
2424
nox -s docs
2525

2626
# create metadata
27-
python3.9 -m docuploader create-metadata \
27+
python3.10 -m docuploader create-metadata \
2828
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
29-
--version=$(python3 setup.py --version) \
29+
--version=$(python3.10 setup.py --version) \
3030
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
31-
--distribution-name=$(python3 setup.py --name) \
31+
--distribution-name=$(python3.10 setup.py --name) \
3232
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
3333
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
3434
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
3535

3636
cat docs.metadata
3737

3838
# upload docs
39-
python3.9 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
39+
python3.10 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
4040

4141

4242
# docfx yaml files
4343
nox -s docfx
4444

4545
# create metadata.
46-
python3.9 -m docuploader create-metadata \
46+
python3.10 -m docuploader create-metadata \
4747
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
48-
--version=$(python3 setup.py --version) \
48+
--version=$(python3.10 setup.py --version) \
4949
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
50-
--distribution-name=$(python3 setup.py --name) \
50+
--distribution-name=$(python3.10 setup.py --name) \
5151
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
5252
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
5353
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
@@ -64,4 +64,4 @@ else
6464
fi
6565

6666
# upload docs
67-
python3.9 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${staging_v2_bucket}"
67+
python3.10 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${staging_v2_bucket}"

.kokoro/publish-docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ RETVAL=0
3636
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
3737

3838
# Install nox
39-
python3.9 -m pip install --require-hashes -r "$PROJECT_ROOT/.kokoro/requirements.txt"
40-
python3.9 -m nox --version
39+
python3.10 -m pip install --require-hashes -r "$PROJECT_ROOT/.kokoro/requirements.txt"
40+
python3.10 -m nox --version
4141

4242
# A file for publishing docs
4343
publish_docs_script="${PROJECT_ROOT}/.kokoro/publish-docs-single.sh"

0 commit comments

Comments
 (0)