forked from abdolence/gcloud-sdk-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5,915 changed files
with
1,112,645 additions
and
80 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[alias] | ||
xtask = "run --release --package xtask --bin xtask --" | ||
protosgen = "run --release --package protosgen --bin protosgen --" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "xtask/proto/googleapis"] | ||
path = xtask/proto/googleapis | ||
[submodule "gcloud-protos-generator/proto/googleapis"] | ||
path = gcloud-protos-generator/proto/googleapis | ||
url = https://github.com/googleapis/googleapis | ||
shallow = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[workspace] | ||
members = [ | ||
"gcloud-sdk", | ||
"xtask", | ||
"gcloud-protos-generator", | ||
"examples/spanner-admin", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = "xtask" | ||
name = "protosgen" | ||
version = "0.4.2" | ||
authors = ["mechiru <[email protected]>", "[email protected]"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# See https://github.com/bazelbuild/bazelisk | ||
USE_BAZEL_VERSION=4.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# To make proto_library rules to include source info in the descriptor | ||
build --protocopt=--include_source_info | ||
build --protocopt=--experimental_allow_proto3_optional | ||
|
||
# This is to avoid JVM SIGBUS crashes on highly parallel builds, | ||
# see https://github.com/bazelbuild/bazel/issues/3236 for more details | ||
build --enable_platform_specific_config | ||
build:linux --sandbox_tmpfs_path=/tmp |
7 changes: 7 additions & 0 deletions
7
gcloud-protos-generator/proto/googleapis/.cloudbuild/Dockerfile.bazel-gapic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM gcr.io/cloud-builders/bazel | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
zip \ | ||
libxml2-dev \ | ||
build-essential | ||
|
20 changes: 20 additions & 0 deletions
20
gcloud-protos-generator/proto/googleapis/.cloudbuild/cloudbuild.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['build', '-f', '.cloudbuild/Dockerfile.bazel-gapic', '-t', 'bazel-gapic', '.'] | ||
- name: 'bazel-gapic' | ||
args: ['build', '--remote_http_cache=https://storage.googleapis.com/$PROJECT_ID-cloud-build-artifacts/$REPO_NAME/bazel-remote-cache', '--google_default_credentials', '//:gapic-cloud-build'] | ||
- name: 'ubuntu' | ||
args: ['mkdir', 'gapic-cloud-build'] | ||
- name: 'ubuntu' | ||
args: ['tar', '-xf', 'bazel-bin/gapic-cloud-build.tar', '-C', 'gapic-cloud-build'] | ||
- name: 'gcr.io/cloud-builders/gsutil' | ||
args: ['-m', 'cp', '-r', 'gapic-cloud-build', 'gs://$PROJECT_ID-cloud-build-artifacts/$REPO_NAME/$COMMIT_SHA/gapic-cloud-build'] | ||
- name: 'ubuntu' | ||
args: ['bash', './.cloudbuild/write-latest.sh', '$COMMIT_SHA'] | ||
artifacts: | ||
objects: | ||
location: 'gs://$PROJECT_ID-cloud-build-artifacts/$REPO_NAME/' | ||
paths: | ||
- 'cloud_build_latest' | ||
options: | ||
machineType: 'N1_HIGHCPU_32' |
3 changes: 3 additions & 0 deletions
3
gcloud-protos-generator/proto/googleapis/.cloudbuild/write-latest.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
echo $1 > cloud_build_latest |
18 changes: 18 additions & 0 deletions
18
gcloud-protos-generator/proto/googleapis/.github/mistaken-pull-closer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# The JSONPath filter expression used to identify which PRs to close. | ||
# The data filtered is the pull request data along with other metadata passed in | ||
# by probot. | ||
# Default behavior: Close all PRs. | ||
filters: | ||
# Don't close PRs in the pubsub_dev branch. | ||
- '@.pull_request.base.ref != "pubsub_dev"' | ||
- '@.pull_request.base.ref != "diregapic"' | ||
|
||
# The message to post to the closed PR. | ||
commentBody: | | ||
Thanks for your contribution! Unfortunately, we don't use GitHub pull | ||
requests to manage code contributions to this repository. Instead, please | ||
see [CONTRIBUTING.md](../blob/master/CONTRIBUTING.md) which provides full | ||
instructions on how to get involved. | ||
# Whether to add a label to the closed PR. | ||
addLabel: false |
50 changes: 50 additions & 0 deletions
50
gcloud-protos-generator/proto/googleapis/.github/workflows/diregapic.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: DIREGAPIC Updater | ||
on: # yamllint disable-line rule:truthy | ||
schedule: | ||
- cron: '19 */8 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
regenerate-compute: | ||
runs-on: ubuntu-latest | ||
container: gcr.io/gapic-images/googleapis:20220222 | ||
steps: | ||
- name: Checkout master | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
- name: Download discovery docs | ||
run: | | ||
curl https://www.googleapis.com/discovery/v1/apis/compute/v1/rest --output google/cloud/compute/v1/compute.v1.json | ||
echo compute_revision=$(grep -oP '"revision":\s*"\d+"' google/cloud/compute/v1/compute.v1.json | grep -oP '\d+') >> $GITHUB_ENV | ||
- name: Regenerate API definitions | ||
run: | | ||
bazel build //google/cloud/compute/v1:compute_gen | ||
cp bazel-bin/google/cloud/compute/v1/compute_gen.proto google/cloud/compute/v1/compute.proto | ||
bazel build //google/cloud/compute/v1:compute_grpc_service_config_gen | ||
cp bazel-bin/google/cloud/compute/v1/compute_grpc_service_config_gen.json google/cloud/compute/v1/compute_grpc_service_config.json | ||
bazel build //google/cloud/compute/v1:compute_gapic_gen | ||
cp bazel-bin/google/cloud/compute/v1/compute_gapic_gen.yaml google/cloud/compute/v1/compute_gapic.yaml | ||
echo api_changes=$(git diff-index --shortstat HEAD) >> $GITHUB_ENV | ||
- name: Build GAPIC clients | ||
if: contains(env.api_changes, 'file') | ||
run: | | ||
bazel build //google/cloud/compute/v1/... | ||
bazel build //google/cloud/compute/v1/... | ||
- name: Create PR | ||
uses: googleapis/code-suggester@v2 | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} | ||
with: | ||
command: pr | ||
upstream_owner: googleapis | ||
upstream_repo: googleapis | ||
title: 'feat: [DIREGAPIC] Update API definitions' | ||
description: 'feat: Update Compute Engine API to revision ${{ env.compute_revision }}' | ||
message: 'feat: Update Compute Engine API to revision ${{ env.compute_revision }}' | ||
primary: 'master' | ||
branch: diregapic | ||
git_dir: '.' | ||
force: true | ||
fork: true |
33 changes: 33 additions & 0 deletions
33
gcloud-protos-generator/proto/googleapis/.github/workflows/generate_api_index.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Generate API Index | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: [master] | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup .NET Core SDK | ||
uses: actions/[email protected] | ||
- name: Checkout googleapis (this repository) | ||
uses: actions/checkout@v2 | ||
with: | ||
path: googleapis | ||
- name: Checkout index generator | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: googleapis/googleapis-api-index-generator | ||
path: gen | ||
- name: Generate API index | ||
run: | | ||
gen/scripts/generate-schema.sh | ||
gen/scripts/generate-index.sh $PWD/googleapis | ||
cp gen/tmp/api-index-v1.json $PWD/googleapis | ||
- name: Commit API index | ||
run: | | ||
cd googleapis | ||
[[ ! $(git diff --exit-code api-index-v1.json) ]] && echo "Nothing to commit." && exit 0 | ||
git config user.name "Google APIs" | ||
git add api-index-v1.json | ||
git commit -m "chore: regenerate API index" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
OWNERS | ||
README.google | ||
google/internal | ||
google/protobuf | ||
.project | ||
artman-genfiles/ | ||
bazel-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
27 changes: 27 additions & 0 deletions
27
gcloud-protos-generator/proto/googleapis/.kokoro/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.8 | ||
|
||
RUN apt-get update | ||
|
||
RUN apt-get install -y \ | ||
zip \ | ||
build-essential \ | ||
python-dev \ | ||
python3-dev \ | ||
openjdk-11-jdk | ||
|
||
RUN mkdir -p /tools | ||
WORKDIR /tools | ||
RUN curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.8.0/bazelisk-linux-amd64 -o bazelisk | ||
RUN chmod +x bazelisk | ||
RUN curl -L https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-linux-x86_64 -o bazel | ||
RUN chmod +x bazel | ||
WORKDIR / | ||
|
||
ENV PATH="/tools:${PATH}" | ||
|
||
ENV BAZELISK_BIN=/tools/bazelisk | ||
ENV BAZEL_BIN=/tools/bazelisk | ||
|
||
RUN apt-get clean | ||
|
||
ENTRYPOINT [ "/bin/bash" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
cd ${KOKORO_ARTIFACTS_DIR}/github/googleapis | ||
cp .kokoro/.bazelrc $HOME/.bazelrc | ||
CACHE_BUCKET=client-libraries-bazel-cache-github | ||
CACHE_CMDLINE="--remote_cache=https://storage.googleapis.com/${CACHE_BUCKET} --google_default_credentials" | ||
|
||
# | ||
# Run build and tests | ||
# | ||
${BAZELISK_BIN} --output_user_root=${BAZEL_ROOT} build ${CACHE_CMDLINE} --keep_going //... | ||
${BAZELISK_BIN} --output_user_root=${BAZEL_ROOT} test ${CACHE_CMDLINE} --flaky_test_attempts=3 --keep_going //... |
5 changes: 5 additions & 0 deletions
5
gcloud-protos-generator/proto/googleapis/.kokoro/continuous.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# This configuration file defines Kokoro job for GitHub presubmit, | ||
# the build_file will be looked up in https://github.com/googleapis/googleapis/ | ||
build_file: "googleapis/.kokoro/start.sh" |
Oops, something went wrong.