Skip to content

Commit

Permalink
Merge branch 'main' into clirr-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dpcollins-google committed Dec 29, 2021
2 parents e69c74d + d7414cf commit cf3a8b7
Show file tree
Hide file tree
Showing 37 changed files with 203 additions and 224 deletions.
3 changes: 3 additions & 0 deletions .github/.OwlBot.lock.yaml
@@ -0,0 +1,3 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:a4d7b2cfc6a9d6b378a6b2458740eae15fcab28854bd23dad3a15102d2e47c87
9 changes: 3 additions & 6 deletions .github/readme/synth.py → .github/.OwlBot.yaml
@@ -1,4 +1,4 @@
# Copyright 2020 Google LLC
# Copyright 2021 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 All @@ -12,8 +12,5 @@
# 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"])
docker:
image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest"
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
18 changes: 0 additions & 18 deletions .github/readme/synth.metadata/synth.metadata

This file was deleted.

1 change: 1 addition & 0 deletions .github/release-trigger.yml
@@ -0,0 +1 @@
enabled: true
5 changes: 2 additions & 3 deletions .github/sync-repo-settings.yaml
Expand Up @@ -2,21 +2,21 @@ rebaseMergeAllowed: false
squashMergeAllowed: true
mergeCommitAllowed: false
branchProtectionRules:
- pattern: master
- pattern: main
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- linkage-monitor
- lint
- clirr
- units (8)
- units (11)
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
- pattern: java7
isAdminEnforced: true
requiredApprovingReviewCount: 1
Expand All @@ -25,7 +25,6 @@ branchProtectionRules:
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- linkage-monitor
- lint
- clirr
- units (8)
Expand Down
3 changes: 2 additions & 1 deletion .github/trusted-contribution.yml
@@ -1,2 +1,3 @@
trustedContributors:
- renovate-bot
- renovate-bot
- gcf-owl-bot[bot]
37 changes: 15 additions & 22 deletions .github/workflows/ci.yaml
@@ -1,19 +1,21 @@
on:
push:
branches:
- master
- main
pull_request:
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [8, 11]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- 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 @@ -23,8 +25,9 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- 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 @@ -34,34 +37,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
distribution: zulu
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
- uses: actions/setup-java@v2
with:
java-version: 8
distribution: zulu
java-version: 11
- run: java -version
- run: .kokoro/build.sh
env:
Expand All @@ -70,8 +62,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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
8 changes: 6 additions & 2 deletions .kokoro/build.sh
Expand Up @@ -69,6 +69,11 @@ integration)
verify
RETURN_CODE=$?
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn -ntp -Pnative -Penable-integration-tests test
RETURN_CODE=$?
;;
samples)
SAMPLES_DIR=samples
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
Expand All @@ -86,7 +91,6 @@ samples)

pushd ${SAMPLES_DIR}
mvn -B \
-Penable-samples \
-ntp \
-DtrimStackTrace=false \
-Dclirr.skip=true \
Expand Down Expand Up @@ -115,7 +119,7 @@ fi
# fix output location of logs
bash .kokoro/coerce_logs.sh

if [[ "${ENABLE_BUILD_COP}" == "true" ]]
if [[ "${ENABLE_FLAKYBOT}" == "true" ]]
then
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot
${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-pubsublite-kafka
Expand Down
55 changes: 0 additions & 55 deletions .kokoro/continuous/readme.cfg

This file was deleted.

21 changes: 20 additions & 1 deletion .kokoro/dependencies.sh
Expand Up @@ -28,7 +28,26 @@ 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'
)

if [[ $javaVersion == 17* ]]
then
# MaxPermSize is no longer supported as of jdk 17
echo -n "-Xmx1024m"
else
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
fi
}

export MAVEN_OPTS=$(determineMavenOpts)

# this should run maven enforcer
retry_with_backoff 3 10 \
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/nightly/integration.cfg
Expand Up @@ -22,7 +22,7 @@ env_vars: {
}

env_vars: {
key: "ENABLE_BUILD_COP"
key: "ENABLE_FLAKYBOT"
value: "true"
}

Expand Down
2 changes: 1 addition & 1 deletion .kokoro/nightly/samples.cfg
Expand Up @@ -33,6 +33,6 @@ env_vars: {
}

env_vars: {
key: "ENABLE_BUILD_COP"
key: "ENABLE_FLAKYBOT"
value: "true"
}
33 changes: 33 additions & 0 deletions .kokoro/presubmit/graalvm-native.cfg
@@ -0,0 +1,33 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm"
}

env_vars: {
key: "JOB_TYPE"
value: "graalvm"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
2 changes: 1 addition & 1 deletion .kokoro/release/common.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 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
2 changes: 1 addition & 1 deletion .kokoro/release/drop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 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
2 changes: 1 addition & 1 deletion .kokoro/release/promote.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 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
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc.sh
@@ -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
12 changes: 4 additions & 8 deletions .kokoro/release/publish_javadoc11.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2021 Google Inc.
# Copyright 2021 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 Expand Up @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true
export NAME=pubsublite-kafka
export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)

# V3 generates docfx yml from javadoc
# generate yml
mvn clean site -B -q -P docFX

# copy README to docfx-yml dir and rename index.md
cp README.md target/docfx-yml/index.md
# copy CHANGELOG to docfx-yml dir and rename history.md
# cloud RAD generation
mvn clean javadoc:aggregate -B -q -P docFX
# include CHANGELOG
cp CHANGELOG.md target/docfx-yml/history.md

pushd target/docfx-yml
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/stage.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 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

0 comments on commit cf3a8b7

Please sign in to comment.