Skip to content
This repository was archived by the owner on Sep 4, 2023. It is now read-only.

Commit 76bba81

Browse files
committed
feat: initial code generation
0 parents  commit 76bba81

File tree

123 files changed

+26565
-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.

123 files changed

+26565
-0
lines changed

.github/CODEOWNERS

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Code owners file.
2+
# This file controls who is tagged for review for any given pull request.
3+
4+
# For syntax help see:
5+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
6+
7+
# The java-samples-reviewers team is the default owner for samples changes
8+
samples/**/*.java @googleapis/java-samples-reviewers

.github/ISSUE_TEMPLATE/bug_report.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
Please run down the following list and make sure you've tried the usual "quick fixes":
12+
13+
- Search the issues already opened: https://github.com/googleapis/java-area120-tables/issues
14+
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform
15+
16+
If you are still having issues, please include as much information as possible:
17+
18+
#### Environment details
19+
20+
1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
21+
General, Core, and Other are also allowed as types
22+
2. OS type and version:
23+
3. Java version:
24+
4. area120-tables version(s):
25+
26+
#### Steps to reproduce
27+
28+
1. ?
29+
2. ?
30+
31+
#### Code example
32+
33+
```java
34+
// example
35+
```
36+
37+
#### Stack trace
38+
```
39+
Any relevant stacktrace here.
40+
```
41+
42+
#### External references such as API reference guides
43+
44+
- ?
45+
46+
#### Any additional information below
47+
48+
49+
Following these steps guarantees the quickest resolution possible.
50+
51+
Thanks!
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this library
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
**Is your feature request related to a problem? Please describe.**
12+
What the problem is. Example: I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
What you want to happen.
16+
17+
**Describe alternatives you've considered**
18+
Any alternative solutions or features you've considered.
19+
20+
**Additional context**
21+
Any other context or screenshots about the feature request.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Support request
3+
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.
4+
5+
---
6+
7+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

.github/PULL_REQUEST_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
2+
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-area120-tables/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
3+
- [ ] Ensure the tests and linter pass
4+
- [ ] Code coverage does not decrease (if any source code was changed)
5+
- [ ] Appropriate docs were updated (if necessary)
6+
7+
Fixes #<issue_number_goes_here> ☕️

.github/release-please.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
releaseType: java-yoshi
2+
bumpMinorPreMajor: true

.github/trusted-contribution.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trustedContributors:
2+
- renovate-bot

.github/workflows/ci.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: ci
7+
jobs:
8+
units:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
java: [7, 8, 11]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-java@v1
16+
with:
17+
java-version: ${{matrix.java}}
18+
- run: java -version
19+
- run: .kokoro/build.sh
20+
env:
21+
JOB_TYPE: test
22+
- name: coverage
23+
uses: codecov/codecov-action@v1
24+
with:
25+
name: actions ${{matrix.java}}
26+
windows:
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-java@v1
31+
with:
32+
java-version: 8
33+
- run: java -version
34+
- run: .kokoro/build.bat
35+
env:
36+
JOB_TYPE: test
37+
dependencies:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
java: [8, 11]
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions/setup-java@v1
45+
with:
46+
java-version: ${{matrix.java}}
47+
- run: java -version
48+
- run: .kokoro/dependencies.sh
49+
linkage-monitor:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2
53+
- uses: actions/setup-java@v1
54+
with:
55+
java-version: 8
56+
- run: java -version
57+
- run: .kokoro/linkage-monitor.sh
58+
lint:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- uses: actions/setup-java@v1
63+
with:
64+
java-version: 8
65+
- run: java -version
66+
- run: .kokoro/build.sh
67+
env:
68+
JOB_TYPE: lint
69+
clirr:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v2
73+
- uses: actions/setup-java@v1
74+
with:
75+
java-version: 8
76+
- run: java -version
77+
- run: .kokoro/build.sh
78+
env:
79+
JOB_TYPE: clirr

.github/workflows/samples.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
pull_request:
3+
name: samples
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions/setup-java@v1
10+
with:
11+
java-version: 8
12+
- name: Run checkstyle
13+
run: mvn -P lint --quiet --batch-mode checkstyle:check
14+
working-directory: samples/snippets

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Maven
2+
target/
3+
4+
# Eclipse
5+
.classpath
6+
.project
7+
.settings
8+
9+
# Intellij
10+
*.iml
11+
.idea/
12+
13+
# python utilities
14+
*.pyc
15+
__pycache__
16+
17+
.flattened-pom.xml

.kokoro/build.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: See documentation in type-shell-output.bat
2+
3+
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh

.kokoro/build.sh

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#!/bin/bash
2+
# Copyright 2019 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
## Get the directory of the build script
19+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
20+
## cd to the parent directory, i.e. the root of the git repo
21+
cd ${scriptDir}/..
22+
23+
# include common functions
24+
source ${scriptDir}/common.sh
25+
26+
# Print out Java version
27+
java -version
28+
echo ${JOB_TYPE}
29+
30+
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
31+
retry_with_backoff 3 10 \
32+
mvn install -B -V \
33+
-DskipTests=true \
34+
-Dclirr.skip=true \
35+
-Denforcer.skip=true \
36+
-Dmaven.javadoc.skip=true \
37+
-Dgcloud.download.skip=true \
38+
-T 1C
39+
40+
# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
41+
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
42+
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
43+
fi
44+
45+
RETURN_CODE=0
46+
set +e
47+
48+
case ${JOB_TYPE} in
49+
test)
50+
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
51+
RETURN_CODE=$?
52+
;;
53+
lint)
54+
mvn com.coveo:fmt-maven-plugin:check
55+
RETURN_CODE=$?
56+
;;
57+
javadoc)
58+
mvn javadoc:javadoc javadoc:test-javadoc
59+
RETURN_CODE=$?
60+
;;
61+
integration)
62+
mvn -B ${INTEGRATION_TEST_ARGS} \
63+
-Penable-integration-tests \
64+
-DtrimStackTrace=false \
65+
-Dclirr.skip=true \
66+
-Denforcer.skip=true \
67+
-fae \
68+
verify
69+
RETURN_CODE=$?
70+
;;
71+
samples)
72+
if [[ -f samples/pom.xml ]]
73+
then
74+
pushd samples
75+
mvn -B \
76+
-Penable-samples \
77+
-DtrimStackTrace=false \
78+
-Dclirr.skip=true \
79+
-Denforcer.skip=true \
80+
-fae \
81+
verify
82+
RETURN_CODE=$?
83+
popd
84+
else
85+
echo "no sample pom.xml found - skipping sample tests"
86+
fi
87+
;;
88+
clirr)
89+
mvn -B -Denforcer.skip=true clirr:check
90+
RETURN_CODE=$?
91+
;;
92+
*)
93+
;;
94+
esac
95+
96+
if [ "${REPORT_COVERAGE}" == "true" ]
97+
then
98+
bash ${KOKORO_GFILE_DIR}/codecov.sh
99+
fi
100+
101+
# fix output location of logs
102+
bash .kokoro/coerce_logs.sh
103+
104+
if [[ "${ENABLE_BUILD_COP}" == "true" ]]
105+
then
106+
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop
107+
${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-area120-tables
108+
fi
109+
110+
echo "exiting with ${RETURN_CODE}"
111+
exit ${RETURN_CODE}

.kokoro/coerce_logs.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
# Copyright 2019 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# This script finds and moves sponge logs so that they can be found by placer
17+
# and are not flagged as flaky by sponge.
18+
19+
set -eo pipefail
20+
21+
## Get the directory of the build script
22+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
23+
## cd to the parent directory, i.e. the root of the git repo
24+
cd ${scriptDir}/..
25+
26+
job=$(basename ${KOKORO_JOB_NAME})
27+
28+
echo "coercing sponge logs..."
29+
for xml in `find . -name *-sponge_log.xml`
30+
do
31+
echo "processing ${xml}"
32+
class=$(basename ${xml} | cut -d- -f2)
33+
dir=$(dirname ${xml})/${job}/${class}
34+
text=$(dirname ${xml})/${class}-sponge_log.txt
35+
mkdir -p ${dir}
36+
mv ${xml} ${dir}/sponge_log.xml
37+
mv ${text} ${dir}/sponge_log.txt
38+
done

.kokoro/common.cfg

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
4+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
5+
6+
# All builds use the trampoline script to run in docker.
7+
build_file: "java-area120-tables/.kokoro/trampoline.sh"
8+
9+
# Tell the trampoline which build file to use.
10+
env_vars: {
11+
key: "TRAMPOLINE_BUILD_FILE"
12+
value: "github/java-area120-tables/.kokoro/build.sh"
13+
}

0 commit comments

Comments
 (0)