Skip to content

Commit 53c4030

Browse files
authored
feat: make repo releasable, add parent/bom (#3)
* feat: make repo releasable, add parent/bom * fix: license headers * fix: compile * deps: fix dependency declarations * deps: tests need opencensus-impl * fix: don't include latest proto changes * chore: ignore opencensus-impl:test from dependency check * fix: allow proto interface changes * docs: restore README content * docs: fix links
1 parent 621d2c8 commit 53c4030

File tree

172 files changed

+3439
-255
lines changed

Some content is hidden

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

172 files changed

+3439
-255
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 51 additions & 0 deletions
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-pubsub/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. pubsub 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!
Lines changed: 21 additions & 0 deletions
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.
Lines changed: 7 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)

.github/release-please.yml

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

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
# Mr Developer
17+
.mr.developer.cfg
18+
19+
.metadata
20+
.project
21+
.pydevproject
22+
*.iml
23+
.idea
24+
.settings
25+
.DS_Store
26+
.classpath
27+
28+
# Built documentation
29+
docs/
30+
31+
32+
# Wheel directory used in Travis builds.
33+
gcloud-java-wheels/
34+
src/test/resources/gcd-head.zip
35+
src/test/resources/gcd-v1beta2-rev1-2.1.1.zip
36+
37+
# API key file containing value of GOOGLE_API_KEY for integration tests
38+
api_key
39+
40+
# Python utilities
41+
*.pyc
42+
artman-genfiles

.kokoro/build.bat

Lines changed: 3 additions & 0 deletions
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" github/java-pubsub/.kokoro/build.sh

.kokoro/build.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
# Print out Java version
24+
java -version
25+
echo ${JOB_TYPE}
26+
27+
mvn install -B -V \
28+
-DskipTests=true \
29+
-Dclirr.skip=true \
30+
-Denforcer.skip=true \
31+
-Dmaven.javadoc.skip=true \
32+
-Dgcloud.download.skip=true \
33+
-T 1C
34+
35+
# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
36+
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
37+
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
38+
fi
39+
40+
case ${JOB_TYPE} in
41+
test)
42+
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
43+
bash ${KOKORO_GFILE_DIR}/codecov.sh
44+
bash .kokoro/coerce_logs.sh
45+
;;
46+
lint)
47+
mvn com.coveo:fmt-maven-plugin:check
48+
;;
49+
javadoc)
50+
mvn javadoc:javadoc javadoc:test-javadoc
51+
;;
52+
integration)
53+
mvn -B ${INTEGRATION_TEST_ARGS} \
54+
-DtrimStackTrace=false \
55+
-Dclirr.skip=true \
56+
-Denforcer.skip=true \
57+
-fae \
58+
verify
59+
bash .kokoro/coerce_logs.sh
60+
;;
61+
clirr)
62+
mvn -B -Denforcer.skip=true clirr:check
63+
;;
64+
*)
65+
;;
66+
esac

.kokoro/coerce_logs.sh

Lines changed: 38 additions & 0 deletions
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

Lines changed: 13 additions & 0 deletions
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-pubsub/.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-pubsub/.kokoro/build.sh"
13+
}

.kokoro/continuous/common.cfg

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
regex: "**/*sponge_log.txt"
8+
}
9+
}
10+
11+
# Download trampoline resources.
12+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
13+
14+
# Use the trampoline script to run in docker.
15+
build_file: "java-pubsub/.kokoro/trampoline.sh"
16+
17+
env_vars: {
18+
key: "TRAMPOLINE_BUILD_FILE"
19+
value: "github/java-pubsub/.kokoro/build.sh"
20+
}
21+
22+
env_vars: {
23+
key: "JOB_TYPE"
24+
value: "test"
25+
}

.kokoro/continuous/dependencies.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "TRAMPOLINE_BUILD_FILE"
11+
value: "github/java-pubsub/.kokoro/dependencies.sh"
12+
}

.kokoro/continuous/integration.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}

.kokoro/continuous/java11.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}

.kokoro/continuous/java7.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
7+
}

.kokoro/continuous/java8-osx.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
build_file: "java-pubsub/.kokoro/build.sh"

.kokoro/continuous/java8-win.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
build_file: "java-pubsub/.kokoro/build.bat"

.kokoro/continuous/java8.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}

.kokoro/continuous/lint.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
5+
env_vars: {
6+
key: "TRAMPOLINE_IMAGE"
7+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
8+
}
9+
10+
env_vars: {
11+
key: "JOB_TYPE"
12+
value: "lint"
13+
}

0 commit comments

Comments
 (0)