Skip to content

Commit a0bf1dd

Browse files
owlbot-bootstrapper[bot]gcf-owl-bot[bot]parthea
authored
feat: add initial files for google.cloud.contentwarehouse.v1 (googleapis#10714)
* feat: initial commit * feat: initial generation of library Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6ImI3ZmY4NGYxNTRiOGM1YmMwYjMyMjA4ZmU2YzM5ODI3YTJhODY0NTEifQ== * Owl Bot copied code from https://github.com/googleapis/googleapis-gen/commit/b7ff84f154b8c5bc0b32208fe6c39827a2a86451 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix release script * run post processor * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update post processor image * fix broken generated code * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix docs build * fix constraints-3.7.txt Co-authored-by: Owlbot Bootstrapper <owlbot-bootstrapper[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent ae3d4ed commit a0bf1dd

179 files changed

Lines changed: 44741 additions & 49 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.kokoro/docker/docs/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ RUN apt-get update \
6060
&& rm -rf /var/lib/apt/lists/* \
6161
&& rm -f /var/cache/apt/archives/*.deb
6262

63-
###################### Install python 3.8.11
63+
###################### Install python 3.9.13
6464

65-
# Download python 3.8.11
66-
RUN wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz
65+
# Download python 3.9.13
66+
RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
6767

6868
# Extract files
69-
RUN tar -xvf Python-3.8.11.tgz
69+
RUN tar -xvf Python-3.9.13.tgz
7070

71-
# Install python 3.8.11
72-
RUN ./Python-3.8.11/configure --enable-optimizations
71+
# Install python 3.9.13
72+
RUN ./Python-3.9.13/configure --enable-optimizations
7373
RUN make altinstall
7474

7575
###################### Install pip
@@ -78,6 +78,6 @@ RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
7878
&& rm /tmp/get-pip.py
7979

8080
# Test pip
81-
RUN python3 -m pip
81+
RUN python3.9 -m pip
8282

83-
CMD ["python3.8"]
83+
CMD ["python3.9"]

.kokoro/docs/common.cfg

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ build_file: "google-cloud-python/.kokoro/trampoline_v2.sh"
1616
# Configure the docker image for kokoro-trampoline.
1717
env_vars: {
1818
key: "TRAMPOLINE_IMAGE"
19-
value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs"
19+
value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs-monorepo"
2020
}
2121
env_vars: {
2222
key: "TRAMPOLINE_BUILD_FILE"
@@ -28,12 +28,6 @@ env_vars: {
2828
value: "docs-staging"
2929
}
3030

31-
env_vars: {
32-
key: "V2_STAGING_BUCKET"
33-
# Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2`
34-
value: "docs-staging-v2"
35-
}
36-
3731
# It will upload the docker image after successful builds.
3832
env_vars: {
3933
key: "TRAMPOLINE_IMAGE_UPLOAD"

.kokoro/populate-secrets.sh

100644100755
File mode changed.

.kokoro/publish-docs-single.sh

100644100755
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ set -eo pipefail
2020

2121
pwd
2222

23-
# Install nox
24-
python3 -m pip install --require-hashes -r .kokoro/requirements.txt
25-
python3 -m nox --version
26-
2723
# build docs
2824
nox -s docs
2925

3026
# create metadata
31-
python3 -m docuploader create-metadata \
27+
python3.9 -m docuploader create-metadata \
3228
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
3329
--version=$(python3 setup.py --version) \
3430
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
@@ -40,14 +36,14 @@ python3 -m docuploader create-metadata \
4036
cat docs.metadata
4137

4238
# upload docs
43-
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
39+
python3.9 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
4440

4541

4642
# docfx yaml files
4743
nox -s docfx
4844

4945
# create metadata.
50-
python3 -m docuploader create-metadata \
46+
python3.9 -m docuploader create-metadata \
5147
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
5248
--version=$(python3 setup.py --version) \
5349
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
@@ -58,5 +54,14 @@ python3 -m docuploader create-metadata \
5854

5955
cat docs.metadata
6056

57+
if [[ -d "google/cloud" ]]; then
58+
# Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2`
59+
staging_v2_bucket="docs-staging-v2"
60+
else
61+
# Push non-cloud library docs to `docs-staging-v2-staging` instead of the
62+
# Cloud RAD bucket `docs-staging-v2`
63+
staging_v2_bucket="docs-staging-v2-staging"
64+
fi
65+
6166
# upload docs
62-
python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
67+
python3.9 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${staging_v2_bucket}"

.kokoro/publish-docs.sh

100644100755
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@ RETVAL=0
3535

3636
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
3737

38+
# Install nox
39+
python3.9 -m pip install --require-hashes -r "$PROJECT_ROOT/.kokoro/requirements.txt"
40+
python3.9 -m nox --version
41+
3842
# A file for publishing docs
3943
publish_docs_script="${PROJECT_ROOT}/.kokoro/publish-docs-single.sh"
4044

4145
for subdir in ${subdirs[@]}; do
4246
for d in `ls -d ${subdir}/*/`; do
4347
should_publish=false
44-
echo "checking changes with 'git diff --quiet HEAD~.. ${d}/**/gapic_version.py'"
48+
echo "checking changes with 'git diff HEAD~.. ${d}/**/gapic_version.py'"
4549
set +e
46-
git diff --quiet "HEAD~.." ${d}/**/gapic_version.py
47-
changed=$?
50+
changed=$(git diff "HEAD~.." ${d}/**/gapic_version.py | wc -l)
4851
set -e
4952
if [[ "${changed}" -eq 0 ]]; then
5053
echo "no change detected in ${d}, skipping"

.kokoro/release-single.sh

100644100755
File mode changed.

.kokoro/release.sh

100644100755
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,33 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /
2525
# Disable buffering, so that the logs stream through.
2626
export PYTHONUNBUFFERED=1
2727

28-
# In order to determine which packages to publish, we need
29-
# to know the difference in */gapic_version.py from the previous
30-
# commit (HEAD~1). This assumes we use squash commit when merging PRs.
31-
git fetch origin main --deepen=1
32-
3328
subdirs=(
3429
packages
3530
)
3631
RETVAL=0
3732

3833
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
3934

35+
cd "$PROJECT_ROOT"
36+
37+
pwd
38+
39+
git config --global --add safe.directory "$PROJECT_ROOT"
40+
41+
# In order to determine which packages to publish, we need
42+
# to know the difference in */gapic_version.py from the previous
43+
# commit (HEAD~1). This assumes we use squash commit when merging PRs.
44+
git fetch origin main --deepen=1
45+
4046
# A file for publishing packages to PyPI
4147
publish_script="${PROJECT_ROOT}/.kokoro/release-single.sh"
4248

4349
for subdir in ${subdirs[@]}; do
4450
for d in `ls -d ${subdir}/*/`; do
4551
should_publish=false
46-
echo "checking changes with 'git diff --quiet HEAD~.. ${d}/**/gapic_version.py'"
52+
echo "checking changes with 'git diff HEAD~.. ${d}/**/gapic_version.py'"
4753
set +e
48-
git diff --quiet "HEAD~.." ${d}/**/gapic_version.py
49-
changed=$?
54+
changed=$(git diff "HEAD~.." ${d}/**/gapic_version.py | wc -l)
5055
set -e
5156
if [[ "${changed}" -eq 0 ]]; then
5257
echo "no change detected in ${d}, skipping"

.kokoro/requirements.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ importlib-metadata==5.0.0 \
357357
# -r requirements.in
358358
# twine
359359
jaraco-classes==3.2.3 \
360-
--hash=sha256:6745f113b0b588239ceb49532aa09c3ebb947433ce311ef2f8e3ad64ebb74594 \
361-
--hash=sha256:e6ef6fd3fcf4579a7a019d87d1e56a883f4e4c35cfe925f86731abc58804e647
360+
--hash=sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158 \
361+
--hash=sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a
362362
# via keyring
363363
jeepney==0.8.0 \
364364
--hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \
@@ -584,6 +584,3 @@ setuptools==65.5.0 \
584584
--hash=sha256:512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17 \
585585
--hash=sha256:f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356
586586
# via -r requirements.in
587-
jaraco.classes==3.2.3 \
588-
--hash=sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158 \
589-
--hash=sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a

.kokoro/trampoline.sh

100644100755
File mode changed.

.kokoro/trampoline_v2.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)