Skip to content

[Java] Re-ordered the publish steps to avoid re-publish errors#48902

Open
raych1 wants to merge 5 commits intomainfrom
users/raych1/adjust-artifact-publish-sequence
Open

[Java] Re-ordered the publish steps to avoid re-publish errors#48902
raych1 wants to merge 5 commits intomainfrom
users/raych1/adjust-artifact-publish-sequence

Conversation

@raych1
Copy link
Copy Markdown
Member

@raych1 raych1 commented Apr 22, 2026

Resolved issue#1 in Azure/azure-sdk-tools#14986

This pull request updates the archetype-java-release-batch.yml pipeline 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

  • The steps to publish the packages-signed artifact have been moved to later in the pipeline, after the GPG signing and flattening steps, to ensure the correct artifacts are processed and published.
  • The gpg-sign-and-flatten.yml step now uses $(Pipeline.Workspace)/packages as its input directory instead of $(Pipeline.Workspace)/packages-signed, reflecting the updated artifact flow.
  • The publishing of the packages-signed artifact now occurs after GPG signing, aligning with the new process order.

Copilot AI review requested due to automatic review settings April 22, 2026 23:27
@raych1 raych1 requested review from benbp and weshaggard as code owners April 22, 2026 23:27
@raych1 raych1 self-assigned this Apr 22, 2026
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: '$(Pipeline.Workspace)/packages'
ArtifactName: 'packages-signed'
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.

@weshaggard we still need two publish steps as the latter one flattens the folder structure which is required by ESRP bulk publish.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-signed that previously occurred immediately after ESRP signing.
  • Updated gpg-sign-and-flatten.yml to read from $(Pipeline.Workspace)/packages.
  • Re-added publishing of packages-signed later in the Signing stage (after GPG sign/flatten).

Comment thread eng/pipelines/templates/stages/archetype-java-release-batch.yml
Comment thread eng/pipelines/templates/stages/archetype-java-release-batch.yml
@raych1
Copy link
Copy Markdown
Member Author

raych1 commented Apr 22, 2026

/azp run java - template

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread eng/pipelines/templates/jobs/ci.yml Outdated
workingDirectory: $(Pipeline.Workspace)
displayName: Update package properties with namespaces

- template: /eng/common/pipelines/templates/steps/create-apireview.yml
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.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we sure about that? For PR builds I'm pretty sure it pulls the artifact from the build.

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.

You're right, API view server side would fetch pipeline artifacts for PR scenarios.

@raych1 raych1 changed the title Moved package-signed publish to latter step [Java] Re-ordered the publish steps to avoid re-publish errors Apr 23, 2026
@raych1 raych1 requested a review from a team as a code owner April 23, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants