Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/generated_files_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
2 changes: 1 addition & 1 deletion .kokoro/release/stage.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddixit14 Can you review this change? Is this looking good to you?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it makes more sense than having something like stage_maps.sh because we might get more artifacts which have the same host.

}

# Need to save the properties file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ pushd $(dirname "$0")/../../
setup_environment_secrets
create_settings_xml_file "settings.xml"

echo "Deploying artifacts to staging repositories"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No functionality change in this shell script. Just changing variable name and comments.

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 \
Expand All @@ -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
Expand Down
22 changes: 22 additions & 0 deletions .kokoro/release/stage_oss_sonatype_org.cfg
Original file line number Diff line number Diff line change
@@ -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_oss_sonatype_org.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"
}
71 changes: 71 additions & 0 deletions .kokoro/release/stage_oss_sonatype_org.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/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

# 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
# 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
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 non-Cloud artifacts to staging repositories in oss.sonatype.org"

# Lists modules for Google Maps artifacts, including their submodules.
IncludedNonCloudModules=$(find java-maps-* -name 'pom.xml' \
|sed -e 's|/pom.xml$||' |xargs |sed -e 's/ /,/g')
echo "Included modules: ${IncludedNonCloudModules}"

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 "${IncludedNonCloudModules}" \
-P release \
-DserverId=nexus \
-DnexusUrl=https://oss.sonatype.org/


# 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} \
-DserverId=nexus \
-DnexusUrl=https://oss.sonatype.org/
else
echo "AUTORELEASE_PR is not set. Not releasing."
fi


Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:google-maps-addressvalidation:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-addressvalidation-v1</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-addressvalidation-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-addressvalidation-v1</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-addressvalidation-v1:current} -->
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</dependency>

<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-addressvalidation-v1</artifactId>
</dependency>
<dependency>
Expand Down Expand Up @@ -86,7 +86,7 @@
</dependency>

<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-addressvalidation-v1</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-addressvalidation-v1</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-addressvalidation-v1:current} -->
<name>grpc-google-maps-addressvalidation-v1</name>
Expand Down Expand Up @@ -34,12 +34,12 @@
<artifactId>proto-google-common-protos</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-addressvalidation-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions java-maps-addressvalidation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:google-maps-addressvalidation:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-addressvalidation-v1</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-addressvalidation-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-addressvalidation-v1</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-addressvalidation-v1:current} -->
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-addressvalidation-v1</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-addressvalidation-v1:current} -->
<name>proto-google-maps-addressvalidation-v1</name>
Expand Down
4 changes: 2 additions & 2 deletions java-maps-routing/google-maps-routing-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:google-maps-routing:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-routing-v2</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-routing-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-routing-v2</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-routing-v2:current} -->
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions java-maps-routing/google-maps-routing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</dependency>

<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-routing-v2</artifactId>
</dependency>
<dependency>
Expand Down Expand Up @@ -86,7 +86,7 @@
</dependency>

<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-routing-v2</artifactId>
<scope>test</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions java-maps-routing/grpc-google-maps-routing-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-routing-v2</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-routing-v2:current} -->
<name>grpc-google-maps-routing-v2</name>
Expand Down Expand Up @@ -34,12 +34,12 @@
<artifactId>proto-google-common-protos</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-routing-v2</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions java-maps-routing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:google-maps-routing:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>grpc-google-maps-routing-v2</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-routing-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-routing-v2</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-routing-v2:current} -->
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion java-maps-routing/proto-google-maps-routing-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<groupId>com.google.maps.api.grpc</groupId>
<artifactId>proto-google-maps-routing-v2</artifactId>
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-routing-v2:current} -->
<name>proto-google-maps-routing-v2</name>
Expand Down