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

Commit 786fefa

Browse files
authored
feat: make repo releasable, add parent/bom (#1)
* feat: make repo reasable, add parent/bom * fix: license headers * fix: declared dependencies * fix: update shared-config version in bom
1 parent caa9ada commit 786fefa

File tree

357 files changed

+5980
-167
lines changed

Some content is hidden

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

357 files changed

+5980
-167
lines changed

.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/datalabeling/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. datalabeling 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

+1
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

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.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" github/java-datalabeling/.kokoro/build.sh

.kokoro/build.sh

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
-Dmaven.javadoc.skip=true \
30+
-Dgcloud.download.skip=true \
31+
-T 1C
32+
33+
# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
34+
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
35+
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
36+
fi
37+
38+
case ${JOB_TYPE} in
39+
test)
40+
mvn test -B
41+
bash ${KOKORO_GFILE_DIR}/codecov.sh
42+
;;
43+
lint)
44+
mvn com.coveo:fmt-maven-plugin:check
45+
;;
46+
javadoc)
47+
mvn javadoc:javadoc javadoc:test-javadoc
48+
;;
49+
integration)
50+
mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify
51+
;;
52+
*)
53+
;;
54+
esac

.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-datalabeling/.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-datalabeling/.kokoro/build.sh"
13+
}

.kokoro/continuous/common.cfg

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}
8+
}
9+
10+
# Download trampoline resources.
11+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
12+
13+
# Use the trampoline script to run in docker.
14+
build_file: "java-datalabeling/.kokoro/trampoline.sh"
15+
16+
env_vars: {
17+
key: "TRAMPOLINE_BUILD_FILE"
18+
value: "github/java-datalabeling/.kokoro/build.sh"
19+
}
20+
21+
env_vars: {
22+
key: "JOB_TYPE"
23+
value: "test"
24+
}

.kokoro/continuous/dependencies.cfg

+12
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-datalabeling/.kokoro/dependencies.sh"
12+
}

.kokoro/continuous/integration.cfg

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

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

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

+3
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-datalabeling/.kokoro/build.sh"

.kokoro/continuous/java8-win.cfg

+3
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-datalabeling/.kokoro/build.bat"

.kokoro/continuous/java8.cfg

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

+13
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+
}
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
}
8+
}
9+
10+
# Download trampoline resources.
11+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
12+
13+
# Use the trampoline script to run in docker.
14+
build_file: "java-datalabeling/.kokoro/trampoline.sh"
15+
16+
# Configure the docker image for kokoro-trampoline.
17+
env_vars: {
18+
key: "TRAMPOLINE_IMAGE"
19+
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/java-datalabeling/.kokoro/continuous/propose_release.sh"
25+
}
26+
27+
# tokens used by release-please to keep an up-to-date release PR.
28+
before_action {
29+
fetch_keystore {
30+
keystore_resource {
31+
keystore_config_id: 73713
32+
keyname: "github-magic-proxy-key-release-please"
33+
}
34+
}
35+
}
36+
37+
before_action {
38+
fetch_keystore {
39+
keystore_resource {
40+
keystore_config_id: 73713
41+
keyname: "github-magic-proxy-token-release-please"
42+
}
43+
}
44+
}
45+
46+
before_action {
47+
fetch_keystore {
48+
keystore_resource {
49+
keystore_config_id: 73713
50+
keyname: "github-magic-proxy-url-release-please"
51+
}
52+
}
53+
}

.kokoro/continuous/propose_release.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Copyright 2019 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eo pipefail
18+
19+
export NPM_CONFIG_PREFIX=/home/node/.npm-global
20+
21+
if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then
22+
# Groom the release PR as new commits are merged.
23+
npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \
24+
--repo-url=googleapis/java-datalabeling \
25+
--package-name="datalabeling" \
26+
--api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \
27+
--proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \
28+
--release-type=java-yoshi
29+
fi

.kokoro/dependencies.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
cd github/java-datalabeling/
19+
20+
# Print out Java
21+
java -version
22+
echo $JOB_TYPE
23+
24+
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
25+
26+
mvn install -DskipTests=true -B -V
27+
mvn -B dependency:analyze -DfailOnWarning=true

0 commit comments

Comments
 (0)