diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 00000000..7b48cc28 --- /dev/null +++ b/.github/readme/synth.py @@ -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"]) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..6bddd18e --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,49 @@ + +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push \ No newline at end of file diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index d26427e4..bc1554ae 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,10 +4,11 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-v') steps: - uses: actions/github-script@v3.0.0 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true script: | // only approve PRs from release-please[bot] @@ -20,6 +21,24 @@ jobs: return; } + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + // trigger auto-release when // 1) it is a SNAPSHOT release (auto-generated post regular release) // 2) there are dependency updates only @@ -66,4 +85,4 @@ jobs: repo: context.repo.repo, issue_number: context.payload.pull_request.number, labels: ['kokoro:force-run', 'automerge'] - }); \ No newline at end of file + }); diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index a1d50073..c46230a7 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -2,7 +2,7 @@ on: pull_request: name: samples jobs: - lint: + checkstyle: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..f4ef87f4 --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-iamcredentials/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 00000000..81fc34e0 --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,36 @@ +#!/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. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-iamcredentials + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Kokoro exposes this as a file, but the scripts expect just a plain variable. +export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) + +# Setup git credentials +echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials +git config --global credential.helper 'store --file ~/.git-credentials' + +python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool +python3.6 -m autosynth.synth \ + --repository=googleapis/java-iamcredentials \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e1ec316..36fd345e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.3](https://www.github.com/googleapis/java-iamcredentials/compare/v1.1.2...v1.1.3) (2020-10-08) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#239](https://www.github.com/googleapis/java-iamcredentials/issues/239)) ([8b0634b](https://www.github.com/googleapis/java-iamcredentials/commit/8b0634bf12d6a956c0dec44cfb0682540c01895f)) + ### [1.1.2](https://www.github.com/googleapis/java-iamcredentials/compare/v1.1.1...v1.1.2) (2020-09-23) diff --git a/README.md b/README.md index 3fdbb58a..fafa4e41 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-iamcredentials:1.1.2' +compile 'com.google.cloud:google-cloud-iamcredentials:1.1.3' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-iamcredentials" % "1.1.2" +libraryDependencies += "com.google.cloud" % "google-cloud-iamcredentials" % "1.1.3" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-iamcredentials-bom/pom.xml b/google-cloud-iamcredentials-bom/pom.xml index 3c748dc3..d16f5ef0 100644 --- a/google-cloud-iamcredentials-bom/pom.xml +++ b/google-cloud-iamcredentials-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-iamcredentials-bom - 1.1.2 + 1.1.3 pom com.google.cloud @@ -64,17 +64,17 @@ com.google.cloud google-cloud-iamcredentials - 1.1.2 + 1.1.3 com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 1.1.2 + 1.1.3 com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 1.1.2 + 1.1.3 diff --git a/google-cloud-iamcredentials/pom.xml b/google-cloud-iamcredentials/pom.xml index 2afa1e2e..78bd8851 100644 --- a/google-cloud-iamcredentials/pom.xml +++ b/google-cloud-iamcredentials/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-iamcredentials - 1.1.2 + 1.1.3 jar Google Cloud IAM Service Account Credentials https://github.com/googleapis/java-iamcredentials @@ -11,7 +11,7 @@ com.google.cloud google-cloud-iamcredentials-parent - 1.1.2 + 1.1.3 google-cloud-iamcredentials diff --git a/grpc-google-cloud-iamcredentials-v1/pom.xml b/grpc-google-cloud-iamcredentials-v1/pom.xml index 78022d6a..268293dc 100644 --- a/grpc-google-cloud-iamcredentials-v1/pom.xml +++ b/grpc-google-cloud-iamcredentials-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 1.1.2 + 1.1.3 grpc-google-cloud-iamcredentials-v1 GRPC library for grpc-google-cloud-iamcredentials-v1 com.google.cloud google-cloud-iamcredentials-parent - 1.1.2 + 1.1.3 diff --git a/pom.xml b/pom.xml index c3d7ba62..23e3a2df 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-iamcredentials-parent pom - 1.1.2 + 1.1.3 Google Cloud IAM Service Account Credentials Parent https://github.com/googleapis/java-iamcredentials @@ -70,23 +70,23 @@ com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 1.1.2 + 1.1.3 com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 1.1.2 + 1.1.3 com.google.cloud google-cloud-iamcredentials - 1.1.2 + 1.1.3 com.google.cloud google-cloud-shared-dependencies - 0.10.0 + 0.10.2 pom import diff --git a/proto-google-cloud-iamcredentials-v1/pom.xml b/proto-google-cloud-iamcredentials-v1/pom.xml index 9ebc4594..9e1d5c74 100644 --- a/proto-google-cloud-iamcredentials-v1/pom.xml +++ b/proto-google-cloud-iamcredentials-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 1.1.2 + 1.1.3 proto-google-cloud-iamcredentials-v1 PROTO library for proto-google-cloud-iamcredentials-v1 com.google.cloud google-cloud-iamcredentials-parent - 1.1.2 + 1.1.3 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 5f440819..f076af9c 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/pom.xml b/samples/pom.xml index 6fef7bfc..ef409fcb 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 2ab0fccf..68b5b708 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index eb85b776..1c0b5dec 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.1.0 + 12.0.0 pom import diff --git a/synth.metadata b/synth.metadata index 741821ef..b79d405f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-iamcredentials.git", - "sha": "8470698224929527d839bbc3bf17e156570b611d" + "sha": "8a9ad5b1b37b0820161ce1d35d86284e9d957f21" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "80003a3de2d8a75f5b47cb2e77e018f7f0f776cc" + "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" } } ], @@ -40,6 +40,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", @@ -52,6 +53,7 @@ ".kokoro/common.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/java8.cfg", + ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", @@ -75,6 +77,7 @@ ".kokoro/presubmit/linkage-monitor.cfg", ".kokoro/presubmit/lint.cfg", ".kokoro/presubmit/samples.cfg", + ".kokoro/readme.sh", ".kokoro/release/bump_snapshot.cfg", ".kokoro/release/common.cfg", ".kokoro/release/common.sh", @@ -92,7 +95,6 @@ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", - "README.md", "codecov.yaml", "google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsClient.java", "google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/IamCredentialsSettings.java", diff --git a/versions.txt b/versions.txt index 1f1085c1..ffb74e3f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-iamcredentials-v1:1.1.2:1.1.2 -grpc-google-cloud-iamcredentials-v1:1.1.2:1.1.2 -google-cloud-iamcredentials:1.1.2:1.1.2 +proto-google-cloud-iamcredentials-v1:1.1.3:1.1.3 +grpc-google-cloud-iamcredentials-v1:1.1.3:1.1.3 +google-cloud-iamcredentials:1.1.3:1.1.3