Skip to content

Commit

Permalink
Merge branch 'main' into renovate/org.apache.maven.plugins-maven-sure…
Browse files Browse the repository at this point in the history
…fire-plugin-3.x
  • Loading branch information
alicejli authored Jan 18, 2023
2 parents 8c7e47c + f30d96c commit dd629f8
Show file tree
Hide file tree
Showing 264 changed files with 21,190 additions and 1,024 deletions.
6 changes: 0 additions & 6 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# All builds use the trampoline script to run in docker.
build_file: "gapic-generator-java/.kokoro/trampoline.sh"

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/gapic-generator-java/.kokoro/build.sh"
}
36 changes: 36 additions & 0 deletions .kokoro/presubmit/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/gapic-generator-java/.kokoro/presubmit/downstream-build.sh"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "cloud-java-ci-test"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "cloud-java-ci-test"
}

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

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "cloud-java-ci-it-service-account"
}

# Defines the google-cloud-java modules to be tested downstream tested with GraalVM native image
# builds.
env_vars: {
key: "MODULES_UNDER_TEST"
value: "java-os-login,java-asset" # OS login's ITSystemTest exercises gax-java's native image
# reflect-config.json.
# Asset not required - added only as a sanity check.
}
99 changes: 99 additions & 0 deletions .kokoro/presubmit/downstream-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#!/bin/bash
# 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.
# 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

## Get the directory of the build script
scriptDir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
## cd to the parent directory, i.e. the root of the git repo
cd "${scriptDir}/.."

if [ -z "${MODULES_UNDER_TEST}" ]; then
echo "MODULES_UNDER_TEST must be set to run downstream-build.sh"
exit 1
fi

# Use GCP Maven Mirror
mkdir -p "${HOME}/.m2"
cp settings.xml "${HOME}/.m2"

### Round 1
# Publish this repo's modules to local maven to make them available for downstream libraries
mvn -B -ntp install --projects '!gapic-generator-java' \
-Dcheckstyle.skip -Dfmt.skip -DskipTests

# Read current BOM version
GAPIC_BOM_VERSION=$(sed -e 's/xmlns=".*"//' gapic-generator-java-bom/pom.xml | xmllint --xpath '/project/version/text()' -)

### Round 2
# Run the updated GAPIC BOM against HEAD of java-shared-dependencies
git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1
pushd java-shared-dependencies/first-party-dependencies

# Replace GAPIC BOM version
xmllint --shell pom.xml <<EOF
setns x=http://maven.apache.org/POM/4.0.0
cd .//x:artifactId[text()="gapic-generator-java-bom"]
cd ../x:version
set ${GAPIC_BOM_VERSION}
save pom.xml
EOF

echo "Modifications to java-shared-dependencies:"
git diff
echo

cd ..
mvn verify install -B -V -ntp -fae \
-DskipTests=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-Denforcer.skip=true

# Namespace (xmlns) prevents xmllint from specifying tag names in XPath
SHARED_DEPS_VERSION=$(sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -)

if [ -z "${SHARED_DEPS_VERSION}" ]; then
echo "Shared dependencies version is not found in pom.xml"
exit 1
fi
popd

### Round 3
# Run the updated java-shared-dependencies BOM against google-cloud-java
git clone "https://github.com/googleapis/google-cloud-java.git" --depth=1
pushd google-cloud-java/google-cloud-jar-parent

# Replace java-shared-dependencies version
xmllint --shell pom.xml <<EOF
setns x=http://maven.apache.org/POM/4.0.0
cd .//x:artifactId[text()="google-cloud-shared-dependencies"]
cd ../x:version
set ${SHARED_DEPS_VERSION}
save pom.xml
EOF

echo "Modifications to google-cloud-java:"
git diff
echo

cd ..
source ./.kokoro/common.sh
RETURN_CODE=0
setup_application_credentials
setup_cloud "$MODULES_UNDER_TEST"
install_modules
run_graalvm_tests "$MODULES_UNDER_TEST"
exit $RETURN_CODE
7 changes: 7 additions & 0 deletions .kokoro/presubmit/graalvm-native-17-downstream.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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/graalvm17:22.3.0"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/graalvm-native-downstream.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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:22.3.0"
}
2 changes: 1 addition & 1 deletion .kokoro/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pycparser==2.21
pyperclip==1.8.2
python-dateutil==2.8.2
requests==2.27.1
certifi==2022.9.24
certifi==2022.12.7
importlib-metadata==4.8.3
zipp==3.6.0
google_api_core==2.8.2
Expand Down
6 changes: 3 additions & 3 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ cachetools==4.2.4 \
# via
# -r requirements.in
# google-auth
certifi==2022.9.24 \
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
certifi==2022.12.7 \
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
--hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
# via
# -r requirements.in
# requests
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ load("@com_google_api_gax_java//:repositories.bzl", "com_google_api_gax_java_rep

com_google_api_gax_java_repositories()

_googleapis_commit = "44d6bef0ca6db8bba3fb324c8186e694bcc4829c"
_googleapis_commit = "7438480b2a1bc6371d748e974f7a3647f90c4e8d"

http_archive(
name = "com_google_googleapis",
Expand Down
2 changes: 1 addition & 1 deletion api-common-java/.kokoro/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pycparser==2.21
pyperclip==1.8.2
python-dateutil==2.8.2
requests==2.27.1
certifi==2022.9.24
certifi==2022.12.7
importlib-metadata==4.8.3
zipp==3.6.0
google_api_core==2.8.2
Expand Down
8 changes: 4 additions & 4 deletions api-common-java/.kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ cachetools==4.2.4 \
# via
# -r requirements.in
# google-auth
certifi==2022.9.24 \
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
certifi==2022.12.7 \
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
--hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
# via
# -r requirements.in
# requests
Expand Down Expand Up @@ -452,4 +452,4 @@ zipp==3.6.0 \
--hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc
# via
# -r requirements.in
# importlib-metadata
# importlib-metadata
2 changes: 1 addition & 1 deletion api-common-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ext {
auto_value_annotations: 'com.google.auto.value:auto-value-annotations:1.10.1',
guava: 'com.google.guava:guava:31.1-jre',
jsr305: 'com.google.code.findbugs:jsr305:3.0.2',
error_prone_annotations: 'com.google.errorprone:error_prone_annotations:2.17.0',
error_prone_annotations: 'com.google.errorprone:error_prone_annotations:2.18.0',

// Testing
junit: 'junit:junit:4.13.2',
Expand Down
2 changes: 1 addition & 1 deletion api-common-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.17.0</version>
<version>2.18.0</version>
<scope>compile</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions gapic-generator-java-pom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<!-- External dependencies, expecially gRPC and Protobuf version, should be
consistent across modules in this repository -->
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<grpc.version>1.51.1</grpc.version>
<grpc.version>1.52.1</grpc.version>
<google.auth.version>1.14.0</google.auth.version>
<gson.version>2.10</gson.version>
<gson.version>2.10.1</gson.version>
<guava.version>31.1-jre</guava.version>
<protobuf.version>3.21.12</protobuf.version>
<maven.compiler.release>8</maven.compiler.release>
Expand Down
2 changes: 1 addition & 1 deletion gapic-generator-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.17.0</version>
<version>2.18.0</version>
</dependency>

<!--
Expand Down
2 changes: 1 addition & 1 deletion gax-java/.kokoro/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pycparser==2.21
pyperclip==1.8.2
python-dateutil==2.8.2
requests==2.27.1
certifi==2022.9.24
certifi==2022.12.7
importlib-metadata==4.8.3
zipp==3.6.0
google_api_core==2.8.2
Expand Down
6 changes: 3 additions & 3 deletions gax-java/.kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ cachetools==4.2.4 \
# via
# -r requirements.in
# google-auth
certifi==2022.9.24 \
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
certifi==2022.12.7 \
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
--hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
# via
# -r requirements.in
# requests
Expand Down
2 changes: 1 addition & 1 deletion gax-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>22.3.0</version>
<version>22.3.1</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java-common-protos/.kokoro/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pycparser==2.21
pyperclip==1.8.2
python-dateutil==2.8.2
requests==2.27.1
certifi==2022.9.24
certifi==2022.12.7
importlib-metadata==4.8.3
zipp==3.6.0
google_api_core==2.8.2
Expand Down
6 changes: 3 additions & 3 deletions java-common-protos/.kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ cachetools==4.2.4 \
# via
# -r requirements.in
# google-auth
certifi==2022.9.24 \
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
certifi==2022.12.7 \
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
--hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
# via
# -r requirements.in
# requests
Expand Down
4 changes: 2 additions & 2 deletions java-common-protos/grpc-google-common-protos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ repositories {
}

dependencies {
compile 'io.grpc:grpc-stub:1.51.1'
compile 'io.grpc:grpc-protobuf:1.51.1'
compile 'io.grpc:grpc-stub:1.52.1'
compile 'io.grpc:grpc-protobuf:1.52.1'
compile project(':proto-google-common-protos')
}

Expand Down
2 changes: 1 addition & 1 deletion java-common-protos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.1</version>
<version>3.4.2</version>
<reportSets>
<reportSet>
<reports>
Expand Down
Loading

0 comments on commit dd629f8

Please sign in to comment.