Skip to content

Commit

Permalink
chore: migrate to owl bot (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Apr 23, 2021
1 parent 9b64a2f commit 2bb034c
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 171 deletions.
4 changes: 4 additions & 0 deletions packages/google-area120-tables/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docker:
digest: sha256:cfc0e802701262c211703c468874d767f65dabe6a1a71d0e07bfc8a3d5175f32
image: gcr.io/repo-automation-bots/owlbot-python:latest

26 changes: 26 additions & 0 deletions packages/google-area120-tables/.github/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

docker:
image: gcr.io/repo-automation-bots/owlbot-python:latest

deep-remove-regex:
- /owl-bot-staging

deep-copy-regex:
- source: /google/area120/tables/(v.*)/.*-py/(.*)
dest: /owl-bot-staging/$1/$2

begin-after-commit-hash: ee56c3493ec6aeb237ff515ecea949710944a20f

4 changes: 2 additions & 2 deletions packages/google-area120-tables/.kokoro/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token")
cd github/python-area120-tables
python3 setup.py sdist bdist_wheel
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
14 changes: 2 additions & 12 deletions packages/google-area120-tables/.kokoro/release/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,8 @@ env_vars: {
value: "github/python-area120-tables/.kokoro/release.sh"
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}

# Tokens needed to report release status back to GitHub
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token"
}
13 changes: 12 additions & 1 deletion packages/google-area120-tables/docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
div#python2-eol {
border-color: red;
border-width: medium;
}
}

/* Ensure minimum width for 'Parameters' / 'Returns' column */
dl.field-list > dt {
min-width: 100px
}

/* Insert space between methods for readability */
dl.method {
padding-top: 10px;
padding-bottom: 10px
}

/* Insert empty space between classes */
dl.class {
padding-bottom: 50px
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,22 @@
import synthtool.gcp as gcp
from synthtool.languages import python

gapic = gcp.GAPICBazel()
common = gcp.CommonTemplates()

# ----------------------------------------------------------------------------
# Generate area120 tables GAPIC layer
# ----------------------------------------------------------------------------
library = gapic.py_library(
service="tables",
version="v1alpha1",
bazel_target="//google/area120/tables/v1alpha1:area120-tables-v1alpha1-py",
)
default_version = "v1alpha1"

s.move(
library,
excludes=[
"setup.py",
"README.rst",
"docs/index.rst",
"scripts/fixup_tables_v1alpha1_keywords.py",
],
)
for library in s.get_staging_dirs(default_version):
s.move(
library,
excludes=[
"setup.py",
"README.rst",
"docs/index.rst",
"scripts/fixup_tables_v1alpha1_keywords.py",
],
)

s.remove_staging_dirs()

# ----------------------------------------------------------------------------
# Add templated files
Expand Down
138 changes: 0 additions & 138 deletions packages/google-area120-tables/synth.metadata

This file was deleted.

0 comments on commit 2bb034c

Please sign in to comment.