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

chore: fix release #213

Merged
merged 7 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# 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

* @googleapis/actools-java @googleapis/yoshi-java
Neenu1995 marked this conversation as resolved.
Show resolved Hide resolved

# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
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/api-common-java/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. api-common-java 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.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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/api-common-java/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> ☕️
7 changes: 7 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configuration for the Blunderbuss GitHub app. For more info see
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
assign_prs_by:
- labels:
- samples
to:
- googleapis/java-samples-reviewers
11 changes: 11 additions & 0 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
externalManifests:
- type: json
file: 'synth.metadata'
jsonpath: '$.generatedFiles[*]'
- type: json
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
ignoreAuthors:
- 'renovate-bot'
- 'yoshi-automation'
- 'release-please[bot]'
19 changes: 19 additions & 0 deletions .github/readme/synth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2020 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 is used to synthesize generated the README for this library."""

from synthtool.languages import java

java.custom_templates(["java_library/README.md"])
2 changes: 1 addition & 1 deletion .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
releaseType: java-yoshi
bumpMinorPreMajor: true
bumpMinorPreMajor: true
Empty file added .github/snippet-bot.yml
Empty file.
22 changes: 11 additions & 11 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ branchProtectionRules:
- pattern: master
isAdminEnforced: true
requiredStatusCheckContexts:
- 'codecov/patch'
- 'codecov/project'
- 'cla/google'
- 'codecov/patch'
- 'codecov/project'
- 'cla/google'
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: true
permissionRules:
- team: Googlers
permission: pull
- team: yoshi-java
permission: push
- team: yoshi-java-admins
permission: admin
- team: yoshi-admins
permission: admin
- team: Googlers
permission: pull
- team: yoshi-java
permission: push
- team: yoshi-java-admins
permission: admin
- team: yoshi-admins
permission: admin
2 changes: 2 additions & 0 deletions .github/trusted-contribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trustedContributors:
- renovate-bot
44 changes: 22 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- master
pull_request:
name: ci
jobs:
Expand All @@ -12,27 +12,27 @@ jobs:
JVM_OPTS: -Xmx3200m
TERM: dumb
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- name: Gradle Assemble
run: ./gradlew assemble
- name: Gradle Test
run: ./gradlew test
- name: Gradle Build
run: ./gradlew build install
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions ${{ matrix.java }}
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- name: Gradle Assemble
run: ./gradlew assemble
- name: Gradle Test
run: ./gradlew test
- name: Gradle Build
run: ./gradlew build install
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions ${{ matrix.java }}
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Java Linter
run: ./gradlew googleJavaFormat
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Java Linter
run: ./gradlew googleJavaFormat
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" %~dp0build.sh
2 changes: 1 addition & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2019 Google Inc.
# 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.
Expand Down
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
4 changes: 2 additions & 2 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ build_file: "api-common-java/.kokoro/trampoline.sh"

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/api-common-java/.kokoro/build.sh"
key: "TRAMPOLINE_BUILD_FILE"
value: "github/api-common-java/.kokoro/build.sh"
}
58 changes: 58 additions & 0 deletions .kokoro/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash
# Copyright 2020 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.

function retry_with_backoff {
attempts_left=$1
sleep_seconds=$2
shift 2
command=$@


# store current flag state
flags=$-

# allow a failures to continue
set +e
${command}
exit_code=$?

# restore "e" flag
if [[ ${flags} =~ e ]]
then set -e
else set +e
fi

if [[ $exit_code == 0 ]]
then
return 0
fi

# failure
if [[ ${attempts_left} > 0 ]]
then
echo "failure (${exit_code}), sleeping ${sleep_seconds}..."
sleep ${sleep_seconds}
new_attempts=$((${attempts_left} - 1))
new_sleep=$((${sleep_seconds} * 2))
retry_with_backoff ${new_attempts} ${new_sleep} ${command}
fi

return $exit_code
}

## Helper functionss
function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; }
function msg() { println "$*" >&2; }
function println() { printf '%s\n' "$(now) $*"; }
1 change: 1 addition & 0 deletions .kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
action {
define_artifacts {
regex: "**/*sponge_log.xml"
regex: "**/*sponge_log.txt"
}
}

Expand Down
5 changes: 5 additions & 0 deletions .kokoro/continuous/java8.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "REPORT_COVERAGE"
value: "true"
}