Skip to content
Permalink
Browse files
feat: initial generation
  • Loading branch information
chingor13 committed Feb 9, 2021
0 parents commit 14bb5db3755f790c7b460a0434b8c878adf6a7ae
Showing with 49,227 additions and 0 deletions.
  1. +10 −0 .github/CODEOWNERS
  2. +51 −0 .github/ISSUE_TEMPLATE/bug_report.md
  3. +21 −0 .github/ISSUE_TEMPLATE/feature_request.md
  4. +7 −0 .github/ISSUE_TEMPLATE/support_request.md
  5. +7 −0 .github/PULL_REQUEST_TEMPLATE.md
  6. +7 −0 .github/blunderbuss.yml
  7. +11 −0 .github/generated-files-bot.yml
  8. +19 −0 .github/readme/synth.py
  9. +2 −0 .github/release-please.yml
  10. 0 .github/snippet-bot.yml
  11. +2 −0 .github/trusted-contribution.yml
  12. +54 −0 .github/workflows/approve-readme.yaml
  13. +88 −0 .github/workflows/auto-release.yaml
  14. +90 −0 .github/workflows/ci.yaml
  15. +14 −0 .github/workflows/samples.yaml
  16. +17 −0 .gitignore
  17. +3 −0 .kokoro/build.bat
  18. +118 −0 .kokoro/build.sh
  19. +38 −0 .kokoro/coerce_logs.sh
  20. +13 −0 .kokoro/common.cfg
  21. +58 −0 .kokoro/common.sh
  22. +25 −0 .kokoro/continuous/common.cfg
  23. +12 −0 .kokoro/continuous/java8.cfg
  24. +55 −0 .kokoro/continuous/readme.cfg
  25. +89 −0 .kokoro/dependencies.sh
  26. +25 −0 .kokoro/nightly/common.cfg
  27. +37 −0 .kokoro/nightly/integration.cfg
  28. +7 −0 .kokoro/nightly/java11.cfg
  29. +7 −0 .kokoro/nightly/java7.cfg
  30. +3 −0 .kokoro/nightly/java8-osx.cfg
  31. +3 −0 .kokoro/nightly/java8-win.cfg
  32. +12 −0 .kokoro/nightly/java8.cfg
  33. +38 −0 .kokoro/nightly/samples.cfg
  34. +43 −0 .kokoro/populate-secrets.sh
  35. +13 −0 .kokoro/presubmit/clirr.cfg
  36. +34 −0 .kokoro/presubmit/common.cfg
  37. +12 −0 .kokoro/presubmit/dependencies.cfg
  38. +33 −0 .kokoro/presubmit/integration.cfg
  39. +7 −0 .kokoro/presubmit/java11.cfg
  40. +7 −0 .kokoro/presubmit/java7.cfg
  41. +3 −0 .kokoro/presubmit/java8-osx.cfg
  42. +3 −0 .kokoro/presubmit/java8-win.cfg
  43. +12 −0 .kokoro/presubmit/java8.cfg
  44. +12 −0 .kokoro/presubmit/linkage-monitor.cfg
  45. +13 −0 .kokoro/presubmit/lint.cfg
  46. +33 −0 .kokoro/presubmit/samples.cfg
  47. +45 −0 .kokoro/readme.sh
  48. +53 −0 .kokoro/release/bump_snapshot.cfg
  49. +49 −0 .kokoro/release/common.cfg
  50. +50 −0 .kokoro/release/common.sh
  51. +6 −0 .kokoro/release/drop.cfg
  52. +32 −0 .kokoro/release/drop.sh
  53. +6 −0 .kokoro/release/promote.cfg
  54. +34 −0 .kokoro/release/promote.sh
  55. +29 −0 .kokoro/release/publish_javadoc.cfg
  56. +77 −0 .kokoro/release/publish_javadoc.sh
  57. +30 −0 .kokoro/release/publish_javadoc11.cfg
  58. +55 −0 .kokoro/release/publish_javadoc11.sh
  59. +6 −0 .kokoro/release/snapshot.cfg
  60. +33 −0 .kokoro/release/snapshot.sh
  61. +19 −0 .kokoro/release/stage.cfg
  62. +45 −0 .kokoro/release/stage.sh
  63. +26 −0 .kokoro/trampoline.sh
  64. +15 −0 .repo-metadata.json
  65. +94 −0 CODE_OF_CONDUCT.md
  66. +139 −0 CONTRIBUTING.md
  67. +201 −0 LICENSE
  68. +143 −0 README.md
  69. +4 −0 codecov.yaml
  70. +97 −0 google-cloud-artifact-registry-bom/pom.xml
  71. +115 −0 google-cloud-artifact-registry/pom.xml
  72. +2,246 −0 ...t-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/ArtifactRegistryClient.java
  73. +466 −0 ...registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/ArtifactRegistrySettings.java
  74. +49 −0 ...ud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/package-info.java
  75. +211 −0 ...egistry/src/main/java/com/google/devtools/artifactregistry/v1beta2/stub/ArtifactRegistryStub.java
  76. +1,269 −0 ...src/main/java/com/google/devtools/artifactregistry/v1beta2/stub/ArtifactRegistryStubSettings.java
  77. +115 −0 ...n/java/com/google/devtools/artifactregistry/v1beta2/stub/GrpcArtifactRegistryCallableFactory.java
  78. +924 −0 ...try/src/main/java/com/google/devtools/artifactregistry/v1beta2/stub/GrpcArtifactRegistryStub.java
  79. +1,014 −0 ...gistry/src/test/java/com/google/devtools/artifactregistry/v1beta2/ArtifactRegistryClientTest.java
  80. +59 −0 ...act-registry/src/test/java/com/google/devtools/artifactregistry/v1beta2/MockArtifactRegistry.java
  81. +373 −0 ...registry/src/test/java/com/google/devtools/artifactregistry/v1beta2/MockArtifactRegistryImpl.java
  82. +73 −0 grpc-google-cloud-artifact-registry-v1beta2/pom.xml
  83. +2,736 −0 ...stry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ArtifactRegistryGrpc.java
  84. +15 −0 java.header
  85. +10 −0 license-checks.xml
  86. +189 −0 pom.xml
  87. +61 −0 proto-google-cloud-artifact-registry-v1beta2/pom.xml
  88. +1,107 −0 ...y-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/CreateRepositoryRequest.java
  89. +110 −0 .../src/main/java/com/google/devtools/artifactregistry/v1beta2/CreateRepositoryRequestOrBuilder.java
  90. +1,098 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/CreateTagRequest.java
  91. +110 −0 ...v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/CreateTagRequestOrBuilder.java
  92. +646 −0 ...stry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeletePackageRequest.java
  93. +50 −0 ...ta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeletePackageRequestOrBuilder.java
  94. +648 −0 ...y-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeleteRepositoryRequest.java
  95. +50 −0 .../src/main/java/com/google/devtools/artifactregistry/v1beta2/DeleteRepositoryRequestOrBuilder.java
  96. +641 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeleteTagRequest.java
  97. +50 −0 ...v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeleteTagRequestOrBuilder.java
  98. +740 −0 ...stry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeleteVersionRequest.java
  99. +64 −0 ...ta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/DeleteVersionRequestOrBuilder.java
  100. +1,954 −0 ...ud-artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/File.java
  101. +257 −0 ...rtifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/FileName.java
  102. +212 −0 ...ct-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/FileOrBuilder.java
  103. +149 −0 ...tifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/FileProto.java
  104. +637 −0 ...t-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetFileRequest.java
  105. +50 −0 ...y-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetFileRequestOrBuilder.java
  106. +643 −0 ...egistry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetPackageRequest.java
  107. +50 −0 ...1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetPackageRequestOrBuilder.java
  108. +646 −0 ...stry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetRepositoryRequest.java
  109. +50 −0 ...ta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetRepositoryRequestOrBuilder.java
  110. +637 −0 ...ct-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetTagRequest.java
  111. +50 −0 ...ry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetTagRequestOrBuilder.java
  112. +801 −0 ...egistry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetVersionRequest.java
  113. +75 −0 ...1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/GetVersionRequestOrBuilder.java
  114. +846 −0 ...ud-artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/Hash.java
  115. +63 −0 ...ct-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/HashOrBuilder.java
  116. +1,145 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListFilesRequest.java
  117. +129 −0 ...v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListFilesRequestOrBuilder.java
  118. +1,146 −0 ...egistry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListFilesResponse.java
  119. +104 −0 ...1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListFilesResponseOrBuilder.java
  120. +917 −0 ...istry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListPackagesRequest.java
  121. +89 −0 ...eta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListPackagesRequestOrBuilder.java
  122. +1,157 −0 ...stry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListPackagesResponse.java
  123. +104 −0 ...ta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListPackagesResponseOrBuilder.java
  124. +921 −0 ...y-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListRepositoriesRequest.java
  125. +89 −0 .../src/main/java/com/google/devtools/artifactregistry/v1beta2/ListRepositoriesRequestOrBuilder.java
  126. +1,167 −0 ...-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListRepositoriesResponse.java
  127. +105 −0 ...src/main/java/com/google/devtools/artifactregistry/v1beta2/ListRepositoriesResponseOrBuilder.java
  128. +1,127 −0 ...-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListTagsRequest.java
  129. +124 −0 ...-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListTagsRequestOrBuilder.java
  130. +1,142 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListTagsResponse.java
  131. +104 −0 ...v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListTagsResponseOrBuilder.java
  132. +1,075 −0 ...istry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListVersionsRequest.java
  133. +114 −0 ...eta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListVersionsRequestOrBuilder.java
  134. +1,157 −0 ...stry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListVersionsResponse.java
  135. +104 −0 ...ta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ListVersionsResponseOrBuilder.java
  136. +463 −0 ...egistry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/OperationMetadata.java
  137. +24 −0 ...1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/OperationMetadataOrBuilder.java
  138. +1,378 −0 ...artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/Package.java
  139. +150 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/PackageOrBuilder.java
  140. +134 −0 ...act-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/PackageProto.java
  141. +2,230 −0 ...ifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/Repository.java
  142. +223 −0 ...t-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/RepositoryName.java
  143. +277 −0 ...istry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/RepositoryOrBuilder.java
  144. +200 −0 ...-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/RepositoryProto.java
  145. +229 −0 ...act-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/ServiceProto.java
  146. +68 −0 ...ct-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/SettingsProto.java
  147. +830 −0 ...oud-artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/Tag.java
  148. +79 −0 ...act-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/TagOrBuilder.java
  149. +161 −0 ...rtifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/TagProto.java
  150. +1,044 −0 ...y-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/UpdateRepositoryRequest.java
  151. +101 −0 .../src/main/java/com/google/devtools/artifactregistry/v1beta2/UpdateRepositoryRequestOrBuilder.java
  152. +1,035 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/UpdateTagRequest.java
  153. +101 −0 ...v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/UpdateTagRequestOrBuilder.java
  154. +1,895 −0 ...artifact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/Version.java
  155. +204 −0 ...registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/VersionOrBuilder.java
  156. +145 −0 ...act-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/VersionProto.java
  157. +181 −0 ...fact-registry-v1beta2/src/main/java/com/google/devtools/artifactregistry/v1beta2/VersionView.java
  158. +116 −0 ...loud-artifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/file.proto
  159. +80 −0 ...d-artifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/package.proto
  160. +134 −0 ...rtifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/repository.proto
  161. +251 −0 ...d-artifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/service.proto
  162. +30 −0 ...-artifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/settings.proto
  163. +109 −0 ...cloud-artifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/tag.proto
  164. +110 −0 ...d-artifact-registry-v1beta2/src/main/proto/google/devtools/artifactregistry/v1beta2/version.proto
  165. +73 −0 renovate.json
  166. +84 −0 samples/install-without-bom/pom.xml
  167. +56 −0 samples/pom.xml
  168. +83 −0 samples/snapshot/pom.xml
  169. +47 −0 samples/snippets/pom.xml
  170. +31 −0 synth.metadata
  171. +30 −0 synth.py
  172. +6 −0 versions.txt
Validating CODEOWNERS rules …
@@ -0,0 +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/yoshi-java

# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
@@ -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-artifact-registry/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. artifactregistry 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!
@@ -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.
@@ -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.
@@ -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-artifact-registry/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> ☕️
@@ -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
@@ -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]'
@@ -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"])
@@ -0,0 +1,2 @@
releaseType: java-yoshi
bumpMinorPreMajor: true
Empty file.
@@ -0,0 +1,2 @@
trustedContributors:
- renovate-bot
@@ -0,0 +1,54 @@
on:
pull_request:
name: auto-merge-readme
jobs:
approve:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
// only approve PRs from yoshi-automation
if (context.payload.pull_request.user.login !== "yoshi-automation") {
return;
}
// only approve PRs like "chore: release <release version>"
if (!context.payload.pull_request.title === "chore: regenerate README") {
return;
}
// only approve PRs with README.md and synth.metadata changes
const files = new Set(
(
await github.paginate(
github.pulls.listFiles.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
})
)
).map(file => file.filename)
);
if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) {
return;
}
// approve README regeneration PR
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Rubber stamped PR!',
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
});
// attach automerge label
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['automerge']
});
@@ -0,0 +1,88 @@
on:
pull_request:
name: auto-release
jobs:
approve:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'release-v')
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
debug: true
script: |
// only approve PRs from release-please[bot]
if (context.payload.pull_request.user.login !== "release-please[bot]") {
return;
}
// only approve PRs like "chore: release <release version>"
if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) {
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
// 3) there are no open dependency update PRs in this repo (to avoid multiple releases)
if (
context.payload.pull_request.body.includes("Fix") ||
context.payload.pull_request.body.includes("Build") ||
context.payload.pull_request.body.includes("Documentation") ||
context.payload.pull_request.body.includes("BREAKING CHANGES") ||
context.payload.pull_request.body.includes("Features")
) {
console.log( "Not auto-releasing since it is not a dependency-update-only release." );
return;
}
const promise = github.pulls.list.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
const open_pulls = await github.paginate(promise)
if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) {
for ( const pull of open_pulls ) {
if ( pull.title.startsWith("deps: update dependency") ) {
console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." );
return;
}
}
}
// approve release PR
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Rubber stamped release!',
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
});
// attach kokoro:force-run and automerge labels
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['kokoro:force-run', 'automerge']
});
@@ -0,0 +1,90 @@
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
- name: Install artifacts to local Maven repository
run: |
source .kokoro/common.sh
retry_with_backoff 3 10 \
mvn install -B -V \
-Dmaven.test.skip -DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true
shell: bash
- uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
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

0 comments on commit 14bb5db

Please sign in to comment.