From 3f8b285edc4a302a3eb0d67a172a38b76385ed27 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 12 Dec 2022 19:58:04 -0500 Subject: [PATCH 01/14] chore: filtering only maps module --- .kokoro/release/stage.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 217f53df2899..ce98e708e6fa 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -29,9 +29,9 @@ create_settings_xml_file "settings.xml" echo "Deploying artifacts to staging repositories" -excludedMapsModule=$(find java-maps-* -name 'pom.xml' \ - |sed -e 's/^/!/' -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') -echo "Excluded modules: ${excludedMapsModule}" +includedMapsModule=$(find java-maps-* -name 'pom.xml' \ + |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') +echo "Included modules: ${includedMapsModule}" mvn clean deploy -B \ -DskipTests=true \ @@ -40,7 +40,8 @@ mvn clean deploy -B \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.homedir=${GPG_HOMEDIR} \ - --projects "${excludedMapsModule}" \ + --projects "${includedMapsModule}" \ + -DnexusUrl="https://oss.sonatype.org/" \ -P release # The job triggered by Release Please (release-trigger) has this AUTORELEASE_PR From f54db10dc427ef17fd30155f25fd6002e437acbe Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 12 Dec 2022 20:25:28 -0500 Subject: [PATCH 02/14] override URL in profile --- .kokoro/release/stage.sh | 5 +++-- google-cloud-pom-parent/pom.xml | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index ce98e708e6fa..789377382276 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -41,8 +41,9 @@ mvn clean deploy -B \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.homedir=${GPG_HOMEDIR} \ --projects "${includedMapsModule}" \ - -DnexusUrl="https://oss.sonatype.org/" \ - -P release + -P release \ + -P release-non-google-oss-sonatype + # The job triggered by Release Please (release-trigger) has this AUTORELEASE_PR # environment variable. Fusion also lets us to specify this variable. diff --git a/google-cloud-pom-parent/pom.xml b/google-cloud-pom-parent/pom.xml index a56f787b65bf..277bbedad70e 100644 --- a/google-cloud-pom-parent/pom.xml +++ b/google-cloud-pom-parent/pom.xml @@ -85,6 +85,21 @@ + + release-non-google-oss-sonatype + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + ossrh + https://oss.sonatype.org/ + + + + + From 590c8f5b2acdd139ce2e441e9c951ae7a363f801 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 12:56:27 -0500 Subject: [PATCH 03/14] stage-non-cloud.sh --- .kokoro/release/stage-non-cloud.sh | 60 ++++++++++++++++++++++++++++++ .kokoro/release/stage.sh | 12 +++--- 2 files changed, 65 insertions(+), 7 deletions(-) create mode 100755 .kokoro/release/stage-non-cloud.sh diff --git a/.kokoro/release/stage-non-cloud.sh b/.kokoro/release/stage-non-cloud.sh new file mode 100755 index 000000000000..789377382276 --- /dev/null +++ b/.kokoro/release/stage-non-cloud.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# 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 + +# Start the releasetool reporter +requirementsFile=$(realpath $(dirname "$0")/../../)/.kokoro/requirements.txt +python3 -m pip install --require-hashes -r $requirementsFile +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +echo "Deploying artifacts to staging repositories" + +includedMapsModule=$(find java-maps-* -name 'pom.xml' \ + |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') +echo "Included modules: ${includedMapsModule}" + +mvn clean deploy -B \ + -DskipTests=true \ + -Dclirr.skip=true \ + --settings ${MAVEN_SETTINGS_FILE} \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} \ + --projects "${includedMapsModule}" \ + -P release \ + -P release-non-google-oss-sonatype + + +# The job triggered by Release Please (release-trigger) has this AUTORELEASE_PR +# environment variable. Fusion also lets us to specify this variable. +if [[ -n "${AUTORELEASE_PR}" ]] +then + echo "Releasing the staging repositories" + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=${MAVEN_SETTINGS_FILE} +else + echo "AUTORELEASE_PR is not set. Not releasing." +fi + + diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 789377382276..217f53df2899 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -29,9 +29,9 @@ create_settings_xml_file "settings.xml" echo "Deploying artifacts to staging repositories" -includedMapsModule=$(find java-maps-* -name 'pom.xml' \ - |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') -echo "Included modules: ${includedMapsModule}" +excludedMapsModule=$(find java-maps-* -name 'pom.xml' \ + |sed -e 's/^/!/' -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') +echo "Excluded modules: ${excludedMapsModule}" mvn clean deploy -B \ -DskipTests=true \ @@ -40,10 +40,8 @@ mvn clean deploy -B \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.homedir=${GPG_HOMEDIR} \ - --projects "${includedMapsModule}" \ - -P release \ - -P release-non-google-oss-sonatype - + --projects "${excludedMapsModule}" \ + -P release # The job triggered by Release Please (release-trigger) has this AUTORELEASE_PR # environment variable. Fusion also lets us to specify this variable. From f8285021d287ae0e45d98368d805e33b95cd9928 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 13:09:21 -0500 Subject: [PATCH 04/14] Release job for java-maps artifacts --- .kokoro/release/stage-non-cloud.cfg | 22 ++++++++++++++++++++++ .kokoro/release/stage-non-cloud.sh | 8 +++++++- .kokoro/release/stage.sh | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .kokoro/release/stage-non-cloud.cfg diff --git a/.kokoro/release/stage-non-cloud.cfg b/.kokoro/release/stage-non-cloud.cfg new file mode 100644 index 000000000000..b794b373a08c --- /dev/null +++ b/.kokoro/release/stage-non-cloud.cfg @@ -0,0 +1,22 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Set a longer timeout for releases instead of the default (180) +timeout_mins: 300 + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-cloud-java/.kokoro/release/stage-non-cloud.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/google-cloud-java/target/nexus-staging/staging/*.properties" + strip_prefix: "github/google-cloud-java" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} \ No newline at end of file diff --git a/.kokoro/release/stage-non-cloud.sh b/.kokoro/release/stage-non-cloud.sh index 789377382276..2b87a43db724 100755 --- a/.kokoro/release/stage-non-cloud.sh +++ b/.kokoro/release/stage-non-cloud.sh @@ -15,6 +15,11 @@ set -eo pipefail +# This stage-non-cloud.sh publishes the artifacts to oss.sonatype.org publishing +# host, not google.oss.sonatype.org. A group ID of Maven artifact can belong to +# one publishing host. As of February 2023, com.google.maps group +# ID is not part of the google.oss.sonatype.org publishing host. + # Start the releasetool reporter requirementsFile=$(realpath $(dirname "$0")/../../)/.kokoro/requirements.txt python3 -m pip install --require-hashes -r $requirementsFile @@ -27,8 +32,9 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -echo "Deploying artifacts to staging repositories" +echo "Deploying non-Cloud artifacts to staging repositories in oss.sonatype.org" +# Lists modules for Google Maps artifacts, including their submodules. includedMapsModule=$(find java-maps-* -name 'pom.xml' \ |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') echo "Included modules: ${includedMapsModule}" diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 217f53df2899..5e27ec52e63a 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -27,7 +27,7 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -echo "Deploying artifacts to staging repositories" +echo "Deploying artifacts to staging repositories in google.oss.sonatype.org" excludedMapsModule=$(find java-maps-* -name 'pom.xml' \ |sed -e 's/^/!/' -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') From 12c91e0a378922b7d9717738ebada55ebb4f2eac Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 13:23:17 -0500 Subject: [PATCH 05/14] comments in existing stage job --- .kokoro/release/stage.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 5e27ec52e63a..efcd03681374 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -29,9 +29,12 @@ create_settings_xml_file "settings.xml" echo "Deploying artifacts to staging repositories in google.oss.sonatype.org" -excludedMapsModule=$(find java-maps-* -name 'pom.xml' \ +# Excluding modules that cannot be published to the google.oss.sonatype.org +# publishing host. +# https://github.com/googleapis/google-cloud-java/issues/9045 +excludedNonCloudModules=$(find java-maps-* -name 'pom.xml' \ |sed -e 's/^/!/' -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') -echo "Excluded modules: ${excludedMapsModule}" +echo "Excluded modules: ${excludedNonCloudModules}" mvn clean deploy -B \ -DskipTests=true \ @@ -40,7 +43,7 @@ mvn clean deploy -B \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.homedir=${GPG_HOMEDIR} \ - --projects "${excludedMapsModule}" \ + --projects "${excludedNonCloudModules}" \ -P release # The job triggered by Release Please (release-trigger) has this AUTORELEASE_PR From 92b4e17d71c95ab1a8ad8cf5c962e81447f2411e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 14 Dec 2022 10:03:55 -0500 Subject: [PATCH 06/14] maps artifacts avoid using com.google.api groupId --- .../google-maps-addressvalidation-bom/pom.xml | 4 ++-- .../google-maps-addressvalidation/pom.xml | 4 ++-- .../grpc-google-maps-addressvalidation-v1/pom.xml | 6 +++--- java-maps-addressvalidation/pom.xml | 4 ++-- .../proto-google-maps-addressvalidation-v1/pom.xml | 2 +- java-maps-routing/google-maps-routing-bom/pom.xml | 4 ++-- java-maps-routing/google-maps-routing/pom.xml | 4 ++-- java-maps-routing/grpc-google-maps-routing-v2/pom.xml | 6 +++--- java-maps-routing/pom.xml | 4 ++-- java-maps-routing/proto-google-maps-routing-v2/pom.xml | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml b/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml index e8138947bfb7..759693437dbb 100644 --- a/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml +++ b/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml @@ -30,12 +30,12 @@ 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 0.6.0-SNAPSHOT diff --git a/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml b/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml index fa806106eae5..22d627f04a39 100644 --- a/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml +++ b/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml @@ -42,7 +42,7 @@ - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 @@ -86,7 +86,7 @@ - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 test diff --git a/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml b/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml index 6745f4b6fa63..73f9cdf81ab4 100644 --- a/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml +++ b/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 0.6.0-SNAPSHOT grpc-google-maps-addressvalidation-v1 @@ -34,7 +34,7 @@ proto-google-common-protos - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 @@ -42,4 +42,4 @@ guava - \ No newline at end of file + diff --git a/java-maps-addressvalidation/pom.xml b/java-maps-addressvalidation/pom.xml index b9f009ee3337..bab5820bc40a 100644 --- a/java-maps-addressvalidation/pom.xml +++ b/java-maps-addressvalidation/pom.xml @@ -32,12 +32,12 @@ 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 0.6.0-SNAPSHOT diff --git a/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml b/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml index 8fc8799a15b2..16ebb1c6d156 100644 --- a/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml +++ b/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 0.6.0-SNAPSHOT proto-google-maps-addressvalidation-v1 diff --git a/java-maps-routing/google-maps-routing-bom/pom.xml b/java-maps-routing/google-maps-routing-bom/pom.xml index 93678c817662..0e9008a1a62b 100644 --- a/java-maps-routing/google-maps-routing-bom/pom.xml +++ b/java-maps-routing/google-maps-routing-bom/pom.xml @@ -30,12 +30,12 @@ 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-routing-v2 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-routing-v2 0.6.0-SNAPSHOT diff --git a/java-maps-routing/google-maps-routing/pom.xml b/java-maps-routing/google-maps-routing/pom.xml index 024a385a7c54..2379682f5e7c 100644 --- a/java-maps-routing/google-maps-routing/pom.xml +++ b/java-maps-routing/google-maps-routing/pom.xml @@ -42,7 +42,7 @@ - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-routing-v2 @@ -86,7 +86,7 @@ - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-routing-v2 test diff --git a/java-maps-routing/grpc-google-maps-routing-v2/pom.xml b/java-maps-routing/grpc-google-maps-routing-v2/pom.xml index ed42fa7a3b4d..4bc896ec0ac8 100644 --- a/java-maps-routing/grpc-google-maps-routing-v2/pom.xml +++ b/java-maps-routing/grpc-google-maps-routing-v2/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-routing-v2 0.6.0-SNAPSHOT grpc-google-maps-routing-v2 @@ -34,7 +34,7 @@ proto-google-common-protos - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-routing-v2 @@ -42,4 +42,4 @@ guava - \ No newline at end of file + diff --git a/java-maps-routing/pom.xml b/java-maps-routing/pom.xml index cd177aab7bce..841aac083c5f 100644 --- a/java-maps-routing/pom.xml +++ b/java-maps-routing/pom.xml @@ -32,12 +32,12 @@ 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc grpc-google-maps-routing-v2 0.6.0-SNAPSHOT - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-routing-v2 0.6.0-SNAPSHOT diff --git a/java-maps-routing/proto-google-maps-routing-v2/pom.xml b/java-maps-routing/proto-google-maps-routing-v2/pom.xml index e13a6d8a2607..deba389216c3 100644 --- a/java-maps-routing/proto-google-maps-routing-v2/pom.xml +++ b/java-maps-routing/proto-google-maps-routing-v2/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google.api.grpc + com.google.maps.api.grpc proto-google-maps-routing-v2 0.6.0-SNAPSHOT proto-google-maps-routing-v2 From 74644e3ad6d118549cdac930fb82bf2de4a35e1b Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 14 Dec 2022 17:22:15 -0500 Subject: [PATCH 07/14] fix 2nd mvn command --- pom.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pom.xml b/pom.xml index 8533b4f85b45..75fbb8c54fad 100644 --- a/pom.xml +++ b/pom.xml @@ -215,5 +215,20 @@ + + release-non-google-oss-sonatype + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + ossrh + https://oss.sonatype.org/ + + + + + From de33a242125aff8c9745a271a9f6766f25fb80d1 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 13:28:48 -0500 Subject: [PATCH 08/14] comment in the profile --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 75fbb8c54fad..ee4517bfd200 100644 --- a/pom.xml +++ b/pom.xml @@ -217,6 +217,8 @@ release-non-google-oss-sonatype + From 1fb7c753d1435f3a81e500310a56023054b0c7ad Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 14:03:10 -0500 Subject: [PATCH 09/14] Renamed stage-non-google-oss-sonatype --- ...tage-non-cloud.cfg => stage-non-google-oss-sonatype.cfg} | 2 +- ...{stage-non-cloud.sh => stage-non-google-oss-sonatype.sh} | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename .kokoro/release/{stage-non-cloud.cfg => stage-non-google-oss-sonatype.cfg} (86%) rename .kokoro/release/{stage-non-cloud.sh => stage-non-google-oss-sonatype.sh} (90%) diff --git a/.kokoro/release/stage-non-cloud.cfg b/.kokoro/release/stage-non-google-oss-sonatype.cfg similarity index 86% rename from .kokoro/release/stage-non-cloud.cfg rename to .kokoro/release/stage-non-google-oss-sonatype.cfg index b794b373a08c..0e3c03c05d9e 100644 --- a/.kokoro/release/stage-non-cloud.cfg +++ b/.kokoro/release/stage-non-google-oss-sonatype.cfg @@ -5,7 +5,7 @@ timeout_mins: 300 env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-cloud-java/.kokoro/release/stage-non-cloud.sh" + value: "github/google-cloud-java/.kokoro/release/stage-non-google-oss-sonatype.sh" } # Need to save the properties file diff --git a/.kokoro/release/stage-non-cloud.sh b/.kokoro/release/stage-non-google-oss-sonatype.sh similarity index 90% rename from .kokoro/release/stage-non-cloud.sh rename to .kokoro/release/stage-non-google-oss-sonatype.sh index 2b87a43db724..27679b0524ce 100755 --- a/.kokoro/release/stage-non-cloud.sh +++ b/.kokoro/release/stage-non-google-oss-sonatype.sh @@ -15,10 +15,12 @@ set -eo pipefail -# This stage-non-cloud.sh publishes the artifacts to oss.sonatype.org publishing +# This stage-non-google-oss-sonatype.sh publishes the artifacts to oss.sonatype.org publishing # host, not google.oss.sonatype.org. A group ID of Maven artifact can belong to # one publishing host. As of February 2023, com.google.maps group -# ID is not part of the google.oss.sonatype.org publishing host. +# ID is not part of the google.oss.sonatype.org publishing host. In future when +# we move com.google.maps (and others) to the +# google.oss.sonatype.org publishing host, we can stop this job separated. # Start the releasetool reporter requirementsFile=$(realpath $(dirname "$0")/../../)/.kokoro/requirements.txt From 992016b7c83c64db3b4cdff2453e4baf0da309e6 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 14:11:38 -0500 Subject: [PATCH 10/14] Removing release-non-google-oss-sonatype profile Removing release-non-google-oss-sonatype profile in favor of the command line parameters --- .../release/stage-non-google-oss-sonatype.sh | 7 +++++-- google-cloud-pom-parent/pom.xml | 15 --------------- pom.xml | 17 ----------------- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/.kokoro/release/stage-non-google-oss-sonatype.sh b/.kokoro/release/stage-non-google-oss-sonatype.sh index 27679b0524ce..2fab358009f5 100755 --- a/.kokoro/release/stage-non-google-oss-sonatype.sh +++ b/.kokoro/release/stage-non-google-oss-sonatype.sh @@ -50,7 +50,8 @@ mvn clean deploy -B \ -Dgpg.homedir=${GPG_HOMEDIR} \ --projects "${includedMapsModule}" \ -P release \ - -P release-non-google-oss-sonatype + -DserverId=nexus \ + -DnexusUrl=https://oss.sonatype.org/ # The job triggered by Release Please (release-trigger) has this AUTORELEASE_PR @@ -60,7 +61,9 @@ then echo "Releasing the staging repositories" mvn nexus-staging:release -B \ -DperformRelease=true \ - --settings=${MAVEN_SETTINGS_FILE} + --settings=${MAVEN_SETTINGS_FILE} \ + -DserverId=nexus \ + -DnexusUrl=https://oss.sonatype.org/ else echo "AUTORELEASE_PR is not set. Not releasing." fi diff --git a/google-cloud-pom-parent/pom.xml b/google-cloud-pom-parent/pom.xml index 277bbedad70e..a56f787b65bf 100644 --- a/google-cloud-pom-parent/pom.xml +++ b/google-cloud-pom-parent/pom.xml @@ -85,21 +85,6 @@ - - release-non-google-oss-sonatype - - - - org.sonatype.plugins - nexus-staging-maven-plugin - - ossrh - https://oss.sonatype.org/ - - - - - diff --git a/pom.xml b/pom.xml index ee4517bfd200..8533b4f85b45 100644 --- a/pom.xml +++ b/pom.xml @@ -215,22 +215,5 @@ - - release-non-google-oss-sonatype - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - - ossrh - https://oss.sonatype.org/ - - - - - From 7139b4c1ca9c6b7f2e7ab2cc681dd4d5423789c7 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 24 Feb 2023 10:32:39 -0500 Subject: [PATCH 11/14] nonCloudModules --- .kokoro/release/stage-non-google-oss-sonatype.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/stage-non-google-oss-sonatype.sh b/.kokoro/release/stage-non-google-oss-sonatype.sh index 2fab358009f5..53230933721b 100755 --- a/.kokoro/release/stage-non-google-oss-sonatype.sh +++ b/.kokoro/release/stage-non-google-oss-sonatype.sh @@ -37,9 +37,9 @@ create_settings_xml_file "settings.xml" echo "Deploying non-Cloud artifacts to staging repositories in oss.sonatype.org" # Lists modules for Google Maps artifacts, including their submodules. -includedMapsModule=$(find java-maps-* -name 'pom.xml' \ +IncludedNonCloudModules=$(find java-maps-* -name 'pom.xml' \ |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') -echo "Included modules: ${includedMapsModule}" +echo "Included modules: ${IncludedNonCloudModules}" mvn clean deploy -B \ -DskipTests=true \ @@ -48,7 +48,7 @@ mvn clean deploy -B \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.homedir=${GPG_HOMEDIR} \ - --projects "${includedMapsModule}" \ + --projects "${IncludedNonCloudModules}" \ -P release \ -DserverId=nexus \ -DnexusUrl=https://oss.sonatype.org/ From de51ed464424d916a147bae98269c38cc1a974ec Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 24 Feb 2023 10:54:10 -0500 Subject: [PATCH 12/14] Adding group_id_check_for_maps_libraries --- .github/workflows/newclient.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/newclient.yaml b/.github/workflows/newclient.yaml index c8d3609d943f..68718b1a7922 100644 --- a/.github/workflows/newclient.yaml +++ b/.github/workflows/newclient.yaml @@ -14,6 +14,34 @@ on: workflow_dispatch: jobs: + group_id_check_for_maps_libraries: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Maps modules + run: | + IncludedNonCloudModules=$(find java-maps-* -name 'pom.xml' \ + |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') + echo "Included modules: ${IncludedNonCloudModules}" + mvn -B -V -ntp install --also-make --projects "${IncludedNonCloudModules}" \ + -DskipTests + + - name: Ensure Maps libraries have com.google.maps group IDs + run: | + for POM in $(find java-maps-* -name 'pom.xml'); do + group_id=$(mvn -q exec:exec -Dexec.executable=echo -Dexec.args='${project.groupId}' \ + --projects $POM 2>/dev/null ) + echo "${group_id}" |grep -q com.google.maps + # 0 if match; otherwise 1 + match=$? + if [ "${match}" == "1" ]; then + echo "Unexpected group ID '${group_id}' found in ${POM}" + exit 1 + fi + echo "Passed ${POM}" + done + echo "All group IDs start with com.google.maps. Good." + generate: runs-on: ubuntu-latest env: From 7e48462f99848f71022736ce6636e6d81a8311c0 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 24 Feb 2023 10:55:08 -0500 Subject: [PATCH 13/14] moving to generated_file_sync --- .github/workflows/generated_files_sync.yaml | 28 +++++++++++++++++++++ .github/workflows/newclient.yaml | 28 --------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/generated_files_sync.yaml b/.github/workflows/generated_files_sync.yaml index 729702b5dc34..189e76e02841 100644 --- a/.github/workflows/generated_files_sync.yaml +++ b/.github/workflows/generated_files_sync.yaml @@ -116,3 +116,31 @@ jobs: architecture: 'x64' - run: python3 -m pip install --require-hashes -r .github/requirements.txt - run: python3 generate-readme.py + + group_id_check_for_maps_libraries: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Maps modules + run: | + IncludedNonCloudModules=$(find java-maps-* -name 'pom.xml' \ + |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') + echo "Included modules: ${IncludedNonCloudModules}" + mvn -B -V -ntp install --also-make --projects "${IncludedNonCloudModules}" \ + -DskipTests + + - name: Ensure Maps libraries have com.google.maps group IDs + run: | + for POM in $(find java-maps-* -name 'pom.xml'); do + group_id=$(mvn -q exec:exec -Dexec.executable=echo -Dexec.args='${project.groupId}' \ + --projects $POM 2>/dev/null ) + echo "${group_id}" |grep -q com.google.maps + # 0 if match; otherwise 1 + match=$? + if [ "${match}" == "1" ]; then + echo "Unexpected group ID '${group_id}' found in ${POM}" + exit 1 + fi + echo "Passed ${POM}" + done + echo "All group IDs start with com.google.maps. Good." \ No newline at end of file diff --git a/.github/workflows/newclient.yaml b/.github/workflows/newclient.yaml index 68718b1a7922..c8d3609d943f 100644 --- a/.github/workflows/newclient.yaml +++ b/.github/workflows/newclient.yaml @@ -14,34 +14,6 @@ on: workflow_dispatch: jobs: - group_id_check_for_maps_libraries: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Maps modules - run: | - IncludedNonCloudModules=$(find java-maps-* -name 'pom.xml' \ - |sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g') - echo "Included modules: ${IncludedNonCloudModules}" - mvn -B -V -ntp install --also-make --projects "${IncludedNonCloudModules}" \ - -DskipTests - - - name: Ensure Maps libraries have com.google.maps group IDs - run: | - for POM in $(find java-maps-* -name 'pom.xml'); do - group_id=$(mvn -q exec:exec -Dexec.executable=echo -Dexec.args='${project.groupId}' \ - --projects $POM 2>/dev/null ) - echo "${group_id}" |grep -q com.google.maps - # 0 if match; otherwise 1 - match=$? - if [ "${match}" == "1" ]; then - echo "Unexpected group ID '${group_id}' found in ${POM}" - exit 1 - fi - echo "Passed ${POM}" - done - echo "All group IDs start with com.google.maps. Good." - generate: runs-on: ubuntu-latest env: From fef27a5f46d1bf9431529e1bc2e099acb169de53 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 24 Feb 2023 12:14:28 -0500 Subject: [PATCH 14/14] renamed job name --- .kokoro/release/stage.cfg | 2 +- .kokoro/release/{stage.sh => stage_google_oss_sonatype_org.sh} | 0 ...e-non-google-oss-sonatype.cfg => stage_oss_sonatype_org.cfg} | 2 +- ...age-non-google-oss-sonatype.sh => stage_oss_sonatype_org.sh} | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename .kokoro/release/{stage.sh => stage_google_oss_sonatype_org.sh} (100%) rename .kokoro/release/{stage-non-google-oss-sonatype.cfg => stage_oss_sonatype_org.cfg} (86%) rename .kokoro/release/{stage-non-google-oss-sonatype.sh => stage_oss_sonatype_org.sh} (96%) diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index 568208675cec..8018146a0d0a 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -5,7 +5,7 @@ timeout_mins: 300 env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-cloud-java/.kokoro/release/stage.sh" + value: "github/google-cloud-java/.kokoro/release/stage_google_oss_sonatype_org.sh" } # Need to save the properties file diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage_google_oss_sonatype_org.sh similarity index 100% rename from .kokoro/release/stage.sh rename to .kokoro/release/stage_google_oss_sonatype_org.sh diff --git a/.kokoro/release/stage-non-google-oss-sonatype.cfg b/.kokoro/release/stage_oss_sonatype_org.cfg similarity index 86% rename from .kokoro/release/stage-non-google-oss-sonatype.cfg rename to .kokoro/release/stage_oss_sonatype_org.cfg index 0e3c03c05d9e..22997e0f4723 100644 --- a/.kokoro/release/stage-non-google-oss-sonatype.cfg +++ b/.kokoro/release/stage_oss_sonatype_org.cfg @@ -5,7 +5,7 @@ timeout_mins: 300 env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-cloud-java/.kokoro/release/stage-non-google-oss-sonatype.sh" + value: "github/google-cloud-java/.kokoro/release/stage_oss_sonatype_org.sh" } # Need to save the properties file diff --git a/.kokoro/release/stage-non-google-oss-sonatype.sh b/.kokoro/release/stage_oss_sonatype_org.sh similarity index 96% rename from .kokoro/release/stage-non-google-oss-sonatype.sh rename to .kokoro/release/stage_oss_sonatype_org.sh index 53230933721b..1c3251c3bb08 100755 --- a/.kokoro/release/stage-non-google-oss-sonatype.sh +++ b/.kokoro/release/stage_oss_sonatype_org.sh @@ -15,7 +15,7 @@ set -eo pipefail -# This stage-non-google-oss-sonatype.sh publishes the artifacts to oss.sonatype.org publishing +# This stage_oss_sonatype_org.sh publishes the artifacts to oss.sonatype.org publishing # host, not google.oss.sonatype.org. A group ID of Maven artifact can belong to # one publishing host. As of February 2023, com.google.maps group # ID is not part of the google.oss.sonatype.org publishing host. In future when