-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ci: release job for Maps libraries #9152
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3f8b285
chore: filtering only maps module
suztomo f54db10
override URL in profile
suztomo 590c8f5
stage-non-cloud.sh
suztomo f828502
Release job for java-maps artifacts
suztomo 12c91e0
comments in existing stage job
suztomo 92b4e17
maps artifacts avoid using com.google.api groupId
suztomo 74644e3
fix 2nd mvn command
suztomo de33a24
comment in the profile
suztomo 1fb7c75
Renamed stage-non-google-oss-sonatype
suztomo 992016b
Removing release-non-google-oss-sonatype profile
suztomo 7139b4c
nonCloudModules
suztomo de51ed4
Adding group_id_check_for_maps_libraries
suztomo 7e48462
moving to generated_file_sync
suztomo fef27a5
renamed job name
suztomo 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -27,11 +27,14 @@ pushd $(dirname "$0")/../../ | |
| setup_environment_secrets | ||
| create_settings_xml_file "settings.xml" | ||
|
|
||
| echo "Deploying artifacts to staging repositories" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 \ | ||
|
|
@@ -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 | ||
|
|
||
This file contains hidden or 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,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" | ||
| } |
This file contains hidden or 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,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 | ||
|
|
||
|
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
@ddixit14 Can you review this change? Is this looking good to you?
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.
Yes, I think it makes more sense than having something like
stage_maps.shbecause we might get more artifacts which have the same host.