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

Commit

Permalink
build: add jdk 17 to java units and dependency builds (#1216) (#948)
Browse files Browse the repository at this point in the history
* update dependencies.sh to not pass MaxPermSize when jdk 17 is used. MaxPermSize is an unrecognized flag in jdk 17.
Source-Link: googleapis/synthtool@a4be338
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Sep 28, 2021
1 parent 53830eb commit 7ada626
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
@@ -1,3 +1,3 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a
digest: sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5
2 changes: 1 addition & 1 deletion .github/blunderbuss.yml
@@ -1,5 +1,5 @@
# Configuration for the Blunderbuss GitHub app. For more info see
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss
assign_prs_by:
- labels:
- samples
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/ci.yaml
@@ -1,22 +1,23 @@
on:
push:
branches:
- master
- main
pull_request:
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
Expand All @@ -29,8 +30,9 @@ jobs:
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.bat
Expand All @@ -40,14 +42,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
Expand All @@ -58,8 +61,9 @@ jobs:
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.sh
Expand All @@ -72,8 +76,9 @@ jobs:
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.sh
Expand Down
23 changes: 22 additions & 1 deletion .kokoro/dependencies.sh
Expand Up @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh
java -version
echo $JOB_TYPE

export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
function determineMavenOpts() {
local javaVersion=$(
# filter down to the version line, then pull out the version between quotes,
# then trim the version number down to its minimal number (removing any
# update or suffix number).
java -version 2>&1 | grep "version" \
| sed -E 's/^.*"(.*?)".*$/\1/g' \
| sed -E 's/^(1\.[0-9]\.0).*$/\1/g'
)

case $javaVersion in
"17")
# MaxPermSize is no longer supported as of jdk 17
echo -n "-Xmx1024m"
;;
*)
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
;;
esac
}

export MAVEN_OPTS=$(determineMavenOpts)

# this should run maven enforcer
retry_with_backoff 3 10 \
Expand Down
38 changes: 19 additions & 19 deletions README.md
Expand Up @@ -103,24 +103,24 @@ use this Cloud Asset Inventory Client Library.

## Samples

Samples are in the [`samples/`](https://github.com/googleapis/java-asset/tree/master/samples) directory.
Samples are in the [`samples/`](https://github.com/googleapis/java-asset/tree/main/samples) directory.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Analyze Iam Policy Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyExample.java) |
| Analyze Iam Policy Longrunning Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningBigqueryExample.java) |
| Analyze Iam Policy Longrunning Gcs Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningGcsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningGcsExample.java) |
| Batch Get Assets History Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) |
| Create Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) |
| Delete Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) |
| Export Assets Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) |
| Export Assets Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) |
| Get Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) |
| List Assets Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ListAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListAssetsExample.java) |
| List Feeds Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) |
| Search All Iam Policies Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) |
| Search All Resources Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) |
| Update Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) |
| Analyze Iam Policy Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyExample.java) |
| Analyze Iam Policy Longrunning Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningBigqueryExample.java) |
| Analyze Iam Policy Longrunning Gcs Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningGcsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningGcsExample.java) |
| Batch Get Assets History Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) |
| Create Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) |
| Delete Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) |
| Export Assets Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) |
| Export Assets Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) |
| Get Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) |
| List Assets Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ListAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListAssetsExample.java) |
| List Feeds Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) |
| Search All Iam Policies Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) |
| Search All Resources Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) |
| Update Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) |



Expand Down Expand Up @@ -233,10 +233,10 @@ Java is a registered trademark of Oracle and/or its affiliates.
[developer-console]: https://console.developers.google.com/
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-asset/blob/master/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-asset/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-asset/blob/master/LICENSE
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-asset/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-asset/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-asset/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudasset.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down

0 comments on commit 7ada626

Please sign in to comment.