-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add kokoro & ci configs to 1.106.1-patch branch #847
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
db792e8
build: add kokoro & ci changes
danielduhh 932f643
add samples folder to pass ci
danielduhh 6459701
build: pin fmt-maven-plugin version to 2.9
BenWhitehead 22f628a
remove samples directory & ci
danielduhh dd68f7b
add ci block
danielduhh 8f8152c
remove snippet bot config
danielduhh dc12641
sync ci changes
danielduhh 85d6400
fix(test): update blob paths used in storage.it.ITStorageTest#testDow…
BenWhitehead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,12 @@ | ||
# 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 @googleapis/storage-dpe is the default owner for changes in this repo | ||
* @googleapis/yoshi-java @googleapis/storage-dpe | ||
**/*.java @googleapis/storage-dpe | ||
|
||
# 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,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 |
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,12 @@ | ||
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]' | ||
- 'gcf-owl-bot[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,18 @@ | ||
{ | ||
"sources": [ | ||
{ | ||
"git": { | ||
"name": ".", | ||
"remote": "https://github.com/googleapis/java-storage.git", | ||
"sha": "c734edf01084419b25825cee1bc1cf9ff8c6369c" | ||
} | ||
}, | ||
{ | ||
"git": { | ||
"name": "synthtool", | ||
"remote": "https://github.com/googleapis/synthtool.git", | ||
"sha": "4f4b1b9b8d8b52f1e9e4a76165896debce5ab7f1" | ||
} | ||
} | ||
] | ||
} |
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,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"]) |
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 |
---|---|---|
@@ -1,2 +1,12 @@ | ||
bumpMinorPreMajor: true | ||
handleGHRelease: true | ||
releaseType: java-yoshi | ||
bumpMinorPreMajor: true | ||
branches: | ||
- bumpMinorPreMajor: true | ||
handleGHRelease: true | ||
releaseType: java-lts | ||
branch: 1.113.14-sp | ||
- bumpMinorPreMajor: true | ||
handleGHRelease: true | ||
releaseType: java-yoshi | ||
branch: 1.106.1-patch |
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,58 @@ | ||
rebaseMergeAllowed: false | ||
squashMergeAllowed: true | ||
mergeCommitAllowed: false | ||
branchProtectionRules: | ||
- pattern: master | ||
isAdminEnforced: true | ||
requiredApprovingReviewCount: 1 | ||
requiresCodeOwnerReviews: true | ||
requiresStrictStatusChecks: false | ||
requiredStatusCheckContexts: | ||
- dependencies (8) | ||
- dependencies (11) | ||
- linkage-monitor | ||
- lint | ||
- clirr | ||
- units (7) | ||
- units (8) | ||
- units (11) | ||
- 'Kokoro - Test: Integration' | ||
- cla/google | ||
- pattern: 1.113.14-sp | ||
isAdminEnforced: true | ||
requiredApprovingReviewCount: 1 | ||
requiresCodeOwnerReviews: true | ||
requiresStrictStatusChecks: false | ||
requiredStatusCheckContexts: | ||
- dependencies (8) | ||
- dependencies (11) | ||
- linkage-monitor | ||
- lint | ||
- clirr | ||
- units (7) | ||
- units (8) | ||
- units (11) | ||
- 'Kokoro - Test: Integration' | ||
- cla/google | ||
- pattern: 1.106.1-patch | ||
isAdminEnforced: true | ||
requiredApprovingReviewCount: 1 | ||
requiresCodeOwnerReviews: true | ||
requiresStrictStatusChecks: false | ||
requiredStatusCheckContexts: | ||
- dependencies (8) | ||
- dependencies (11) | ||
- lint | ||
- clirr | ||
- units (7) | ||
- units (8) | ||
- units (11) | ||
- 'Kokoro - Test: Integration' | ||
- cla/google | ||
permissionRules: | ||
- team: yoshi-admins | ||
permission: admin | ||
- team: yoshi-java-admins | ||
permission: admin | ||
- team: yoshi-java | ||
permission: push |
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,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'] | ||
}); |
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,88 @@ | ||
on: | ||
pull_request: | ||
name: auto-release | ||
jobs: | ||
approve: | ||
runs-on: ubuntu-latest | ||
if: contains(github.head_ref, 'release-please') | ||
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: 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'] | ||
}); |
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: | ||
- 1.106.1 | ||
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 | ||
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: .kokoro/build.sh | ||
shell: bash | ||
- name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) | ||
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 |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
:: See documentation in type-shell-output.bat | ||
|
||
"C:\Program Files\Git\bin\bash.exe" github/java-storage/.kokoro/build.sh | ||
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an expected changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kokoro changes are a result of the old branch (mar 2020) being out of date with the latest config