Merged
Conversation
Member
hallipr
commented
Sep 11, 2021
- Stop publishing to ADO when ShouldPublish is false
- To ensure there's are gpg signatures to publish as build artifacts, do a local gpg deployment when not publishing to a repository
- Only check remote repo content when deployment fails. Checking before maven deployment was taking more time than letting the first attempt fail for conflict.
- Restructure the script to let the url parameter dictate a set of variables (shouldPublishPackage, releaseType, packageUrl) rather than repeating logic in each url based conditional block
weshaggard
reviewed
Sep 13, 2021
| if ($packageReposityUrl -match "https://pkgs.dev.azure.com/azure-sdk/\b(internal|public)\b/*") { | ||
| # Azure DevOps feeds don't support staging | ||
| $shouldPublishPackage = $ShouldPublish -and !$StageOnly | ||
| $releaseType = 'AzureDevOps' |
Member
There was a problem hiding this comment.
Should make releaseType an input parameter to the script?
Member
Author
There was a problem hiding this comment.
It's reliably implicit from the uri. As is, there's no chance of conflict, just the possibility of someone calling us with an incorrect uri. If we add the parameter, then we'd have to check for an unsupported uri and for uris that don't match the releaseType parameter.
weshaggard
reviewed
Sep 13, 2021
| } | ||
|
|
||
| #Local GPG deployment is required when we're not going to publish a package, or when we're publishing to maven central | ||
| $requiresLocalGpg = !$shouldPublishPackage -or ($releaseType -eq 'MavenCentralStaging') -or ($releaseType -eq 'MavenCentral') |
Member
There was a problem hiding this comment.
Nevermind I think I understand the logic now. For DevOps or Snapshot you will already be doing the steps that will generate the gpg files so you don't need to do it explicitly in those cases.
weshaggard
approved these changes
Sep 13, 2021
090bfdb to
ab8fdf3
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.