Skip to content

Commit

Permalink
Merge branch 'master' into addTemplateChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl authored Aug 16, 2024
2 parents 16e9e44 + adf1b0d commit 77c9c38
Show file tree
Hide file tree
Showing 7 changed files with 323 additions and 365 deletions.
410 changes: 200 additions & 210 deletions docker/owlbot/java/src/requirements.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docker/owlbot/python/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ steps:
args: [ 'build',
'-t', 'gcr.io/$PROJECT_ID/owlbot-python:$SHORT_SHA',
'-t', 'gcr.io/$PROJECT_ID/owlbot-python:latest',
'-t', 'gcr.io/$PROJECT_ID/owlbot-python:infrastructure-public-image-$SHORT_SHA',
'-f', 'docker/owlbot/python/Dockerfile', '.' ]
images:
- 'gcr.io/$PROJECT_ID/owlbot-python:$SHORT_SHA'
- 'gcr.io/$PROJECT_ID/owlbot-python:latest'
- 'gcr.io/$PROJECT_ID/owlbot-python:infrastructure-public-image-$SHORT_SHA'
218 changes: 107 additions & 111 deletions synthtool/gcp/templates/java_library/.kokoro/requirements.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,18 @@ 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
RUN python3 -m pip
RUN python3.10 -m pip

# Install build requirements
COPY requirements.txt /requirements.txt
RUN python3 -m pip install --require-hashes -r requirements.txt
RUN python3.10 -m pip install --require-hashes -r requirements.txt

CMD ["python3.10"]

This file was deleted.

20 changes: 10 additions & 10 deletions synthtool/gcp/templates/python_library/.kokoro/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,42 @@ export PYTHONUNBUFFERED=1
export PATH="${HOME}/.local/bin:${PATH}"

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

# build docs
nox -s docs

# create metadata
python3 -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 -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 -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 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
python3.10 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
1 change: 0 additions & 1 deletion tests/test_python_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ def test_python_library():
common = gcp.CommonTemplates(template_path=template_dir)
templated_files = common.py_library()

assert os.path.exists(templated_files / ".kokoro/docs/docs-presubmit.cfg")
assert os.path.exists(templated_files / ".kokoro/docker/docs/Dockerfile")


Expand Down

0 comments on commit 77c9c38

Please sign in to comment.