From 3f768227333054565c8ee6f91025ece495823743 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Mon, 13 May 2024 00:48:24 +0000 Subject: [PATCH] feat: enable hermetic code generation --- .../hermetic_library_generation.yaml | 24 ++++++++++++ .../update_googleapis_committish.yaml | 24 ++++++++++++ generation_config.yaml | 37 +++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 .github/workflows/hermetic_library_generation.yaml create mode 100644 .github/workflows/update_googleapis_committish.yaml create mode 100644 generation_config.yaml diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml new file mode 100644 index 0000000000..5568fb2037 --- /dev/null +++ b/.github/workflows/hermetic_library_generation.yaml @@ -0,0 +1,24 @@ +# Copyright 2024 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. + +# Generates the code changes that correspond to changes in generation_config.yaml. +# A pull request is also created with these changes +name: Hermetic library generation upon generation config change through pull requests +on: + pull_request: + workflow_dispatch: +jobs: + update-googleapis-commit: + uses: googleapis/sdk-platform-java/.github/workflows/hermetic_library_generation.yaml@centralized-hermetic-workflows + diff --git a/.github/workflows/update_googleapis_committish.yaml b/.github/workflows/update_googleapis_committish.yaml new file mode 100644 index 0000000000..4b21462c73 --- /dev/null +++ b/.github/workflows/update_googleapis_committish.yaml @@ -0,0 +1,24 @@ +# Copyright 2024 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. + +# Updates the googleapis_committish entry in generation_config.yaml +# The updated value is the commit hash of googleapis/googleapis@HEAD +name: Update googleapis committish +on: + schedule: + - cron: '* 2 * * *' + workflow_dispatch: +jobs: + update-googleapis-commit: + uses: googleapis/sdk-platform-java/.github/workflows/update_googleapis_comittish.yaml@centralized-hermetic-workflows diff --git a/generation_config.yaml b/generation_config.yaml new file mode 100644 index 0000000000..743da31aab --- /dev/null +++ b/generation_config.yaml @@ -0,0 +1,37 @@ +gapic_generator_version: 2.40.0 +protoc_version: '25.3' +googleapis_commitish: 25a1a57957d9e4bf431897d280b2569b26dc9165 +libraries_bom_version: 26.38.0 +template_excludes: + - .gitignore + - .kokoro/presubmit/integration.cfg + - .kokoro/presubmit/graalvm-native.cfg + - .kokoro/presubmit/graalvm-native-17.cfg + - .kokoro/nightly/integration.cfg + - .kokoro/presubmit/samples.cfg + - .kokoro/nightly/samples.cfg + - .github/ISSUE_TEMPLATE/bug_report.md + - .github/PULL_REQUEST_TEMPLATE.md + - .github/trusted-contribution.yml + - CONTRIBUTING.md + - codecov.yaml + - .github/release-please.yml + - renovate.json + - .kokoro/requirements.in + - .kokoro/requirements.txt +libraries: +- api_shortname: bigtable + name_pretty: Cloud Bigtable + product_documentation: https://cloud.google.com/bigtable + client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/history + issue_tracker: https://issuetracker.google.com/savedsearches/559777 + release_level: stable + distribution_name: com.google.cloud:google-cloud-bigtable + codeowner_team: @googleapis/api-bigtable @googleapis/api-bigtable-partners + api_id: bigtable.googleapis.com + library_type: GAPIC_COMBO + extra_versioned_modules: google-cloud-bigtable-emulator,google-cloud-bigtable-emulator-core + excluded_poms: google-cloud-bigtable-bom + GAPICs: + - proto_path: google/bigtable/v2 + - proto_path: google/bigtable/admin/v2