Skip to content

Commit 2424aeb

Browse files
author
ddixit14
committed
chore: add template files
1 parent 7699e02 commit 2424aeb

File tree

91 files changed

+4819
-0
lines changed

Some content is hidden

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

91 files changed

+4819
-0
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
docker:
15+
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
16+
digest: sha256:b47e411068ffc6e6990cb4e0802fbac9a4488dec7f5f424553518ba21abea208
17+
# created: 2022-07-26T00:00:00.000000000Z

.github/.OwlBot.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
docker:
16+
image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest"

.github/release-please.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
primaryBranch: monorepo_script_output
2+
releaseType: java-yoshi
3+
manifest: true

.github/release-trigger.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enabled: true
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Googleapis Sync (Hermetic Build)
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
create-pull-request:
7+
name: Create pull request for recent googleapis changes
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
repository: 'googleapis/google-cloud-java'
13+
- name: Setup workspace
14+
run: |
15+
mkdir -p "${WORKSPACE}"
16+
git config user.email "yoshi-code-bot[bot]@users.noreply.github.com"
17+
git config user.name "yoshi-code-bot"
18+
19+
git clone --quiet --branch "${BASE_BRANCH}" --depth 1 \
20+
https://github.com/googleapis/google-cloud-java \
21+
"${WORKSPACE}/google-cloud-java"
22+
cd "${WORKSPACE}/google-cloud-java"
23+
# This should match the branch name we push to remote in the following steps
24+
git checkout -b monorepo_googleapis_change
25+
env:
26+
WORKSPACE: /tmp/googleapis-sync
27+
# Note for cutover to main: update this to main
28+
BASE_BRANCH: monorepo_script_output
29+
- name: Propagate googleapis commits to google-cloud-java
30+
run: |
31+
.kokoro/sync_with_googleapis.sh
32+
env:
33+
WORKSPACE: /tmp/googleapis-sync
34+
GOOGLE_CLOUD_JAVA_DIR: /tmp/googleapis-sync/google-cloud-java
35+
- name: Push changes to remote repository
36+
run: |
37+
git remote add origin_with_auth \
38+
https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git
39+
git push -f --set-upstream origin_with_auth monorepo_googleapis_change
40+
working-directory: /tmp/googleapis-sync/google-cloud-java
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
43+
- name: Create pull request
44+
run: |
45+
gh pr create --title='chore: googleapis change propagation via hermetic build' \
46+
--body='googleapis change propagation via hermetic build' \
47+
--base="${BASE_BRANCH}" \
48+
--head=monorepo_googleapis_change
49+
working-directory: /tmp/googleapis-sync/google-cloud-java
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
52+
# Note for cutover to main: update this to main
53+
BASE_BRANCH: monorepo_script_output
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
on:
16+
workflow_dispatch:
17+
schedule:
18+
# every morning
19+
- cron: '0 1 * * *'
20+
name: readme
21+
jobs:
22+
update:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-python@v2
27+
with:
28+
python-version: '3.7'
29+
architecture: 'x64'
30+
- run: python3 -m pip install requests
31+
- run: python3 generate-readme.py
32+
- uses: googleapis/code-suggester@v3
33+
env:
34+
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
command: pr
37+
upstream_owner: googleapis
38+
upstream_repo: google-cloud-java
39+
description: 'ran python3 generate-readme.py'
40+
title: 'chore: regenerate client table in README'
41+
message: 'chore: regenerate client table in README'
42+
branch: update-readme
43+
primary: main
44+
force: true
45+
git_dir: '.'

.github/sync-repo-settings.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Whether or not rebase-merging is enabled on this repository.
2+
# Defaults to `true`
3+
rebaseMergeAllowed: false
4+
5+
# Whether or not squash-merging is enabled on this repository.
6+
# Defaults to `true`
7+
squashMergeAllowed: true
8+
9+
# Whether or not PRs are merged with a merge commit on this repository.
10+
# Defaults to `false`
11+
mergeCommitAllowed: false
12+
13+
# Rules for main branch protection
14+
branchProtectionRules:
15+
# Identifies the protection rule pattern. Name of the branch to be protected.
16+
# Defaults to `main`
17+
- pattern: main
18+
# Can admins overwrite branch protection.
19+
# Defaults to `true`
20+
isAdminEnforced: true
21+
# Number of approving reviews required to update matching branches.
22+
# Defaults to `1`
23+
requiredApprovingReviewCount: 1
24+
# Are reviews from code owners required to update matching branches.
25+
# Defaults to `false`
26+
requiresCodeOwnerReviews: true
27+
# Require up to date branches
28+
requiresStrictStatusChecks: false
29+
# List of required status check contexts that must pass for commits to be accepted to matching branches.
30+
requiredStatusCheckContexts:
31+
- "cla/google"
32+
# List of explicit permissions to add (additive only)
33+
permissionRules:
34+
- team: yoshi-admins
35+
permission: admin
36+
- team: yoshi-java-admins
37+
permission: admin
38+
- team: yoshi-java
39+
permission: push

.github/workflows/ci.yaml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
# TODO: Update to main
20+
- monorepo_script_output
21+
pull_request:
22+
name: ci
23+
jobs:
24+
units:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
java: [8, 11, 17]
30+
steps:
31+
- name: Get current date
32+
id: date
33+
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-java@v3
36+
with:
37+
distribution: zulu
38+
java-version: ${{matrix.java}}
39+
- run: java -version
40+
- uses: actions/cache@v3
41+
id: mvn-cache
42+
with:
43+
path: ~/.m2/repository
44+
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.date }}
45+
- run: |
46+
mvn -B -ntp \
47+
-Dclirr.skip=true \
48+
-Denforcer.skip=true \
49+
-Dcheckstyle.skip=true \
50+
-Dflatten.skip=true \
51+
-Danimal.sniffer.skip=true \
52+
-T 1C \
53+
test
54+
windows:
55+
runs-on: windows-latest
56+
steps:
57+
- name: Support longpaths
58+
run: git config --system core.longpaths true
59+
- uses: actions/checkout@v3
60+
- uses: actions/setup-java@v3
61+
with:
62+
distribution: zulu
63+
java-version: 11
64+
- run: java -version
65+
- run: .kokoro/build.bat
66+
env:
67+
JOB_TYPE: test
68+
# TODO: Uncomment the needed Github Actions
69+
# dependencies:
70+
# runs-on: ubuntu-latest
71+
# strategy:
72+
# matrix:
73+
# java: [8, 11, 17]
74+
# steps:
75+
# - uses: actions/checkout@v3
76+
# - uses: actions/setup-java@v3
77+
# with:
78+
# distribution: zulu
79+
# java-version: ${{matrix.java}}
80+
# - run: java -version
81+
# - run: .kokoro/dependencies.sh
82+
# lint:
83+
# runs-on: ubuntu-latest
84+
# steps:
85+
# - uses: actions/checkout@v3
86+
# - uses: actions/setup-java@v3
87+
# with:
88+
# distribution: zulu
89+
# java-version: 11
90+
# - run: java -version
91+
# - run: .kokoro/build.sh
92+
# env:
93+
# JOB_TYPE: lint
94+
# clirr:
95+
# runs-on: ubuntu-latest
96+
# steps:
97+
# - uses: actions/checkout@v3
98+
# - uses: actions/setup-java@v3
99+
# with:
100+
# distribution: zulu
101+
# java-version: 8
102+
# - run: java -version
103+
# - run: .kokoro/build.sh
104+
# env:
105+
# JOB_TYPE: clirr

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Packages
2+
dist
3+
bin
4+
var
5+
sdist
6+
target
7+
8+
# Unit test / coverage reports
9+
.coverage
10+
.tox
11+
nosetests.xml
12+
13+
# Translations
14+
*.mo
15+
16+
.metadata
17+
.project
18+
.pydevproject
19+
*.iml
20+
.idea
21+
.settings
22+
.DS_Store
23+
.classpath
24+
25+
# Built documentation
26+
docs/
27+
28+
# API key file containing value of GOOGLE_API_KEY for integration tests
29+
api_key
30+
31+
# Python utilities
32+
*.pyc

.kokoro/build.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:: Copyright 2022 Google LLC
2+
::
3+
:: Licensed under the Apache License, Version 2.0 (the "License");
4+
:: you may not use this file except in compliance with the License.
5+
:: You may obtain a copy of the License at
6+
::
7+
:: http://www.apache.org/licenses/LICENSE-2.0
8+
::
9+
:: Unless required by applicable law or agreed to in writing, software
10+
:: distributed under the License is distributed on an "AS IS" BASIS,
11+
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
:: See the License for the specific language governing permissions and
13+
:: limitations under the License.
14+
:: Github action job to test core java library features on
15+
:: downstream client libraries before they are released.
16+
:: See documentation in type-shell-output.bat
17+
18+
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh

0 commit comments

Comments
 (0)