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

Commit

Permalink
feat: make repo releasable, add parent (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Oct 24, 2019
1 parent 956cc05 commit 2a930d1
Show file tree
Hide file tree
Showing 267 changed files with 4,207 additions and 109 deletions.
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve

---

Thanks for stopping by to let us know something could be better!

**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.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/java-tasks/issues
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform

If you are still having issues, please include as much information as possible:

#### Environment details

1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types
2. OS type and version:
3. Java version:
4. cloudtasks version(s):

#### Steps to reproduce

1. ?
2. ?

#### Code example

```java
// example
```

#### Stack trace
```
Any relevant stacktrace here.
```

#### External references such as API reference guides

- ?

#### Any additional information below


Following these steps guarantees the quickest resolution possible.

Thanks!
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this library

---

Thanks for stopping by to let us know something could be better!

**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.

**Is your feature request related to a problem? Please describe.**
What the problem is. Example: I'm always frustrated when [...]

**Describe the solution you'd like**
What you want to happen.

**Describe alternatives you've considered**
Any alternative solutions or features you've considered.

**Additional context**
Any other context or screenshots about the feature request.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/support_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Support request
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.

---

**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.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
releaseType: java-yoshi
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.gitignore

# Packages
dist
bin
var
sdist
target

# Unit test / coverage reports
.coverage
.tox
nosetests.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg

.metadata
.project
.pydevproject
*.iml
.idea
.settings
.DS_Store
.classpath

# Built documentation
docs/


# Wheel directory used in Travis builds.
gcloud-java-wheels/
src/test/resources/gcd-head.zip
src/test/resources/gcd-v1beta2-rev1-2.1.1.zip

# API key file containing value of GOOGLE_API_KEY for integration tests
api_key

# Python utilities
*.pyc
artman-genfiles
venv
3 changes: 3 additions & 0 deletions .kokoro/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:: See documentation in type-shell-output.bat

"C:\Program Files\Git\bin\bash.exe" github/java-tasks/.kokoro/build.sh
60 changes: 60 additions & 0 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# Print out Java version
java -version
echo ${JOB_TYPE}

mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C

# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
fi

case ${JOB_TYPE} in
test)
mvn test -B -Dclirr.skip=true
bash ${KOKORO_GFILE_DIR}/codecov.sh
bash .kokoro/coerce_logs.sh
;;
lint)
mvn com.coveo:fmt-maven-plugin:check
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
;;
integration)
mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -Dclirr.skip=true -fae verify
bash .kokoro/coerce_logs.sh
;;
clirr)
mvn -B clirr:check
;;
*)
;;
esac
38 changes: 38 additions & 0 deletions .kokoro/coerce_logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This script finds and moves sponge logs so that they can be found by placer
# and are not flagged as flaky by sponge.

set -eo pipefail

## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

job=$(basename ${KOKORO_JOB_NAME})

echo "coercing sponge logs..."
for xml in `find . -name *-sponge_log.xml`
do
echo "processing ${xml}"
class=$(basename ${xml} | cut -d- -f2)
dir=$(dirname ${xml})/${job}/${class}
text=$(dirname ${xml})/${class}-sponge_log.txt
mkdir -p ${dir}
mv ${xml} ${dir}/sponge_log.xml
mv ${text} ${dir}/sponge_log.txt
done
13 changes: 13 additions & 0 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# All builds use the trampoline script to run in docker.
build_file: "java-tasks/.kokoro/trampoline.sh"

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-tasks/.kokoro/build.sh"
}
25 changes: 25 additions & 0 deletions .kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
regex: "**/*sponge_log.txt"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "java-tasks/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-tasks/.kokoro/build.sh"
}

env_vars: {
key: "JOB_TYPE"
value: "test"
}
12 changes: 12 additions & 0 deletions .kokoro/continuous/dependencies.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-tasks/.kokoro/dependencies.sh"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/integration.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java11.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java7.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
}
3 changes: 3 additions & 0 deletions .kokoro/continuous/java8-osx.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-tasks/.kokoro/build.sh"
3 changes: 3 additions & 0 deletions .kokoro/continuous/java8-win.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-tasks/.kokoro/build.bat"
7 changes: 7 additions & 0 deletions .kokoro/continuous/java8.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}
13 changes: 13 additions & 0 deletions .kokoro/continuous/lint.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.

env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "lint"
}
Loading

0 comments on commit 2a930d1

Please sign in to comment.