Skip to content
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

build: fix docs build #12965

Merged
merged 3 commits into from
Jul 31, 2024
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
5 changes: 2 additions & 3 deletions .kokoro/docker/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ RUN tar -xvf Python-3.10.14.tgz
RUN ./Python-3.10.14/configure --enable-optimizations
RUN make altinstall

RUN python3.10 -m venv /venv
ENV PATH /venv/bin:$PATH
ENV PATH /usr/local/bin/python3.10:$PATH

###################### Install pip
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3 /tmp/get-pip.py \
&& python3.10 /tmp/get-pip.py \
&& rm /tmp/get-pip.py

# Test pip
Expand Down
16 changes: 8 additions & 8 deletions .kokoro/publish-docs-single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,30 @@ pwd
nox -s docs

# create metadata
python3.9 -m docuploader create-metadata \
python3.10 -m docuploader create-metadata \
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
--version=$(python3 setup.py --version) \
--version=$(python3.10 setup.py --version) \
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
--distribution-name=$(python3 setup.py --name) \
--distribution-name=$(python3.10 setup.py --name) \
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)

cat docs.metadata

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


# docfx yaml files
nox -s docfx

# create metadata.
python3.9 -m docuploader create-metadata \
python3.10 -m docuploader create-metadata \
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
--version=$(python3 setup.py --version) \
--version=$(python3.10 setup.py --version) \
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
--distribution-name=$(python3 setup.py --name) \
--distribution-name=$(python3.10 setup.py --name) \
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
Expand All @@ -64,4 +64,4 @@ else
fi

# upload docs
python3.9 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${staging_v2_bucket}"
python3.10 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${staging_v2_bucket}"
4 changes: 2 additions & 2 deletions .kokoro/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ RETVAL=0
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)

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

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