-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Deploy jar individually to avoid 413 error #25879
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
+23
−12
Merged
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,7 @@ env: | |
| RELEASE_NOTES_COMMIT: ${{ inputs.release-notes-commit }} | ||
| GIT_CI_USER: ${{ vars.GIT_CI_USER || 'prestodb-ci' }} | ||
| GIT_CI_EMAIL: ${{ vars.GIT_CI_EMAIL || '[email protected]' }} | ||
| MAVEN_AUTO_PUBLISH: ${{ vars.MAVEN_AUTO_PUBLISH || 'true' }} | ||
|
|
||
| jobs: | ||
| publish-release-tag: | ||
|
|
@@ -212,18 +213,28 @@ jobs: | |
| GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}" | ||
| run: | | ||
| unset MAVEN_CONFIG | ||
| ./mvnw -s ${{ github.workspace }}/settings.xml -V -B -U -e -T1C deploy \ | ||
| -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" \ | ||
| -Dmaven.wagon.http.retryHandler.count=8 \ | ||
| -DskipTests \ | ||
| -DstagingProfileId="${{ secrets.MAVEN_STAGING_PROFILE_ID }}" \ | ||
| -DkeepStagingRepositoryOnFailure=true \ | ||
| -DkeepStagingRepositoryOnCloseRuleFailure=true \ | ||
| -DautoReleaseAfterClose=true \ | ||
| -DstagingProgressTimeoutMinutes=60 \ | ||
| -Poss-release \ | ||
| -Pdeploy-to-ossrh \ | ||
| -pl '!presto-test-coverage' | ||
| modules=$(find . -maxdepth 1 -type d \( ! -name . \) -exec test -f '{}/pom.xml' \; -print | sed 's|^./||') | ||
| for module in $modules; do | ||
| if [ "$module" = "presto-test-coverage" ]; then | ||
| echo "Skipping $module" | ||
| continue | ||
| fi | ||
| MODULE_PATH=$(awk -F'[<>]' '/^ <groupId>/ {print $3; exit}' "$module/pom.xml" | sed 's|\.|/|g' | sed 's|^com/facebook/presto||') | ||
| echo "Checking https://repo1.maven.org/maven2/com/facebook/presto${MODULE_PATH}/${module}/${RELEASE_TAG}" | ||
| if ! curl --silent --fail "https://repo1.maven.org/maven2/com/facebook/presto${MODULE_PATH}/${module}/${RELEASE_TAG}" > /dev/null; then | ||
| echo "Publishing ${module}" | ||
| ./mvnw -s ${{ github.workspace }}/settings.xml -V -B -U -e -T1C deploy \ | ||
| -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" \ | ||
| -Dmaven.wagon.http.retryHandler.count=8 \ | ||
| -DskipTests \ | ||
| -Drelease.autoPublish=${{ env.MAVEN_AUTO_PUBLISH }} \ | ||
| -Poss-release \ | ||
| -Pdeploy-to-ossrh \ | ||
| -pl "$module" | ||
| else | ||
| echo "${module} ${RELEASE_TAG} already published, skipping." | ||
| fi | ||
| done | ||
|
|
||
| publish-docker-image: | ||
| needs: publish-maven-artifacts | ||
|
|
||
Oops, something went wrong.
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.
What would happen if there's a timeout here?
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.
That's fine, there are 2 cases:
For this release, since we disabled the auto publish, it will upload the artifacts and do the validation when the curl command failed. If we get error, we can drop the uploaded artifacts and try again.
For future release, if enabled auto publish, when the curl command failed, we can re-run the action after other published modules visible in the maven repo.
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.
For number 2, how would we know that we ended skipping a module?
Uh oh!
There was an error while loading. Please reload this page.
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.
I don't think we will miss any module, because it will try to publish the module if the curl command failed for any reason.