This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 42ce0b4
Showing
106 changed files
with
20,049 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Code owners file. | ||
# This file controls who is tagged for review for any given pull request. | ||
|
||
# For syntax help see: | ||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax | ||
|
||
# The java-samples-reviewers team is the default owner for samples changes | ||
samples/**/*.java @googleapis/java-samples-reviewers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-workflows/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. workflows 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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
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: | ||
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-workflows/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea | ||
- [ ] Ensure the tests and linter pass | ||
- [ ] Code coverage does not decrease (if any source code was changed) | ||
- [ ] Appropriate docs were updated (if necessary) | ||
|
||
Fixes #<issue_number_goes_here> ☕️ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
releaseType: java-yoshi | ||
bumpMinorPreMajor: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
trustedContributors: | ||
- renovate-bot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
name: ci | ||
jobs: | ||
units: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [7, 8, 11] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{matrix.java}} | ||
- run: java -version | ||
- run: .kokoro/build.sh | ||
env: | ||
JOB_TYPE: test | ||
- name: coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: actions ${{matrix.java}} | ||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- run: java -version | ||
- run: .kokoro/build.bat | ||
env: | ||
JOB_TYPE: test | ||
dependencies: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [8, 11] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{matrix.java}} | ||
- run: java -version | ||
- run: .kokoro/dependencies.sh | ||
linkage-monitor: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- run: java -version | ||
- run: .kokoro/linkage-monitor.sh | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- run: java -version | ||
- run: .kokoro/build.sh | ||
env: | ||
JOB_TYPE: lint | ||
clirr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- run: java -version | ||
- run: .kokoro/build.sh | ||
env: | ||
JOB_TYPE: clirr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
on: | ||
pull_request: | ||
name: samples | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- name: Run checkstyle | ||
run: mvn -P lint --quiet --batch-mode checkstyle:check | ||
working-directory: samples/snippets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Maven | ||
target/ | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings | ||
|
||
# Intellij | ||
*.iml | ||
.idea/ | ||
|
||
# python utilities | ||
*.pyc | ||
__pycache__ | ||
|
||
.flattened-pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" %~dp0build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#!/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}/.. | ||
|
||
# include common functions | ||
source ${scriptDir}/common.sh | ||
|
||
# Print out Java version | ||
java -version | ||
echo ${JOB_TYPE} | ||
|
||
# attempt to install 3 times with exponential backoff (starting with 10 seconds) | ||
retry_with_backoff 3 10 \ | ||
mvn install -B -V \ | ||
-DskipTests=true \ | ||
-Dclirr.skip=true \ | ||
-Denforcer.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_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) | ||
fi | ||
|
||
RETURN_CODE=0 | ||
set +e | ||
|
||
case ${JOB_TYPE} in | ||
test) | ||
mvn test -B -Dclirr.skip=true -Denforcer.skip=true | ||
RETURN_CODE=$? | ||
;; | ||
lint) | ||
mvn com.coveo:fmt-maven-plugin:check | ||
RETURN_CODE=$? | ||
;; | ||
javadoc) | ||
mvn javadoc:javadoc javadoc:test-javadoc | ||
RETURN_CODE=$? | ||
;; | ||
integration) | ||
mvn -B ${INTEGRATION_TEST_ARGS} \ | ||
-Penable-integration-tests \ | ||
-DtrimStackTrace=false \ | ||
-Dclirr.skip=true \ | ||
-Denforcer.skip=true \ | ||
-fae \ | ||
verify | ||
RETURN_CODE=$? | ||
;; | ||
samples) | ||
if [[ -f samples/pom.xml ]] | ||
then | ||
pushd samples | ||
mvn -B \ | ||
-Penable-samples \ | ||
-DtrimStackTrace=false \ | ||
-Dclirr.skip=true \ | ||
-Denforcer.skip=true \ | ||
-fae \ | ||
verify | ||
RETURN_CODE=$? | ||
popd | ||
else | ||
echo "no sample pom.xml found - skipping sample tests" | ||
fi | ||
;; | ||
clirr) | ||
mvn -B -Denforcer.skip=true clirr:check | ||
RETURN_CODE=$? | ||
;; | ||
*) | ||
;; | ||
esac | ||
|
||
if [ "${REPORT_COVERAGE}" == "true" ] | ||
then | ||
bash ${KOKORO_GFILE_DIR}/codecov.sh | ||
fi | ||
|
||
# fix output location of logs | ||
bash .kokoro/coerce_logs.sh | ||
|
||
if [[ "${ENABLE_BUILD_COP}" == "true" ]] | ||
then | ||
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop | ||
${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-workflows | ||
fi | ||
|
||
echo "exiting with ${RETURN_CODE}" | ||
exit ${RETURN_CODE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-workflows/.kokoro/trampoline.sh" | ||
|
||
# Tell the trampoline which build file to use. | ||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: "github/java-workflows/.kokoro/build.sh" | ||
} |
Oops, something went wrong.