[Java] Re-ordered the publish steps to avoid re-publish errors#48902
[Java] Re-ordered the publish steps to avoid re-publish errors#48902
Conversation
| - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml | ||
| parameters: | ||
| ArtifactPath: '$(Pipeline.Workspace)/packages' | ||
| ArtifactName: 'packages-signed' |
There was a problem hiding this comment.
@weshaggard we still need two publish steps as the latter one flattens the folder structure which is required by ESRP bulk publish.
There was a problem hiding this comment.
Pull request overview
This PR updates the Java release batch pipeline template to adjust the flow of the packages-signed artifact so it’s produced later, and to have GPG signing/flattening run from $(Pipeline.Workspace)/packages rather than $(Pipeline.Workspace)/packages-signed.
Changes:
- Removed the in-stage publish+download of
packages-signedthat previously occurred immediately after ESRP signing. - Updated
gpg-sign-and-flatten.ymlto read from$(Pipeline.Workspace)/packages. - Re-added publishing of
packages-signedlater in the Signing stage (after GPG sign/flatten).
|
/azp run java - template |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| workingDirectory: $(Pipeline.Workspace) | ||
| displayName: Update package properties with namespaces | ||
|
|
||
| - template: /eng/common/pipelines/templates/steps/create-apireview.yml |
There was a problem hiding this comment.
Looks like API view steps consume the files on disk instead of the build artifact. So, it works fine by moving them before the publish steps. With this, it solves the artifact re-publish issue in re-run scenarios.
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6195395&view=logs&j=3dc8fd7e-4368-5a92-293e-d53cefc8c4b3&t=8c40b8d0-6d0c-5aff-154c-0936ead577df
There was a problem hiding this comment.
Are we sure about that? For PR builds I'm pretty sure it pulls the artifact from the build.
There was a problem hiding this comment.
You're right, API view server side would fetch pipeline artifacts for PR scenarios.
Resolved issue#1 in Azure/azure-sdk-tools#14986
This pull request updates the
archetype-java-release-batch.ymlpipeline template to streamline the handling of signed artifacts. The main changes involve reordering steps related to artifact publishing and adjusting which directories are used for GPG signing and artifact publication.Changes
packages-signedartifact have been moved to later in the pipeline, after the GPG signing and flattening steps, to ensure the correct artifacts are processed and published.gpg-sign-and-flatten.ymlstep now uses$(Pipeline.Workspace)/packagesas its input directory instead of$(Pipeline.Workspace)/packages-signed, reflecting the updated artifact flow.packages-signedartifact now occurs after GPG signing, aligning with the new process order.