Skip to content

[ci] Enable BAR publishing for real-signed builds - #1530

Merged
jonathanpeppers merged 4 commits into
mainfrom
jonathanpeppers-enable-bar-publishing
Aug 19, 2026
Merged

jonathanpeppers merged 4 commits into
mainfrom
jonathanpeppers-enable-bar-publishing

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

  • remove the stale barPublishingEnabled gate and variable
  • run publish_signed_packages automatically under the same real-sign condition as signing
  • retain manual BAR validation and external setup documentation

Validation

  • parsed the changed YAML files with PyYAML
  • verified the BAR branch/reason condition matrix (9 cases)
  • dotnet test build\publishing\SignedPackagePublisher.Tests\SignedPackagePublisher.Tests.csproj --configuration Release --nologo (18 passed)

Remove the stale BAR publishing feature gate so publishing follows the same official-build condition as real signing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Enables automatic BAR publishing for real-signed builds by removing the now-stale barPublishingEnabled variable gate and aligning the publish stage condition with the existing “real-sign” criteria used by signing. This keeps BAR validation/manual workflows and documentation intact while making real-signed publishing happen automatically.

Changes:

  • Removed the barPublishingEnabled variable and related “publishing disabled” messaging.
  • Updated the publish_signed_packages stage condition to run automatically under the same real-sign conditions as the signing stage.
  • Updated publishing documentation to reflect external setup requirements (without referencing the removed gate).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/publishing-signed-packages.md Removes references to the barPublishingEnabled gate and documents external prerequisites for BAR publishing.
build/ci/variables.yml Drops the stale barPublishingEnabled variable while retaining BAR feed/config variables.
build/ci/stage-publish-signed-artifacts.yml Removes the barPublishingEnabled condition gate so publish runs automatically for real-signed builds (and still supports manual validation mode).

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

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.

Removing barPublishingEnabled enables production publishing before the required Darc default-channel mapping exists. Fresh Maestro queries find no mapping for android-libraries/main, and validation build 14995889 registered BAR build 327604 but selected channels: []; the normal path passes -RequireDefaultChannels true, so a real-signed official build with missing packages will fail promotion. Please create and verify the intended channel/feed mapping and non-validation promotion path, or retain a gate until those prerequisites are complete.

Continue using configured Darc default channels without requiring a mapping, so official builds register successfully until the channel is configured.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f43cbf0d-6b25-442c-bb49-409e3066d704
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto Addressed in 31fef6f77. Production still calls Arcade's publish-using-darc.ps1, which always passes darc add-build-to-channel --default-channels, but it no longer passes -RequireDefaultChannels true / --default-channels-required.

With the current empty mapping, official builds can register assets in BAR without failing or publishing them. Once the android-libraries/main default channel is configured, this same path will publish to it automatically. The documentation now states that behavior explicitly. No Maestro configuration was changed.

Validation: changed YAML parses successfully, the focused publisher suite passes all 18 tests, and a direct check confirms the vendored script still uses --default-channels while the stage does not require a mapping. Re-requesting your review.

@dalexsoto dalexsoto left a comment

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.

Two independent publishing blockers remain:

  • publish_signed_packages depends only on sign_artifacts; standard_tests and extended_tests are sibling stages, so succeeded() does not include them. An official build can register and eventually publish packages while required tests are failed or still running.
  • The setup documentation provisions only an android-libraries/main default-channel mapping, but the enabled condition also covers every release/* branch. Darc resolves mappings against the build's exact branch, so following the documented setup leaves release builds registration-only with zero channels.

Please gate production publishing on all required test stages (while allowing intentionally skipped extended tests), and provision/document release-branch mappings or narrow the publishing condition accordingly.

Document that each main or release branch intended to publish needs its own default-channel mapping.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f43cbf0d-6b25-442c-bb49-409e3066d704
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto Thanks. The branch-specific behavior is intentional: Darc default-channel mappings are configured per exact branch, so main is not expected to cover release/*. Each release branch that should publish gets its own mapping; until then, builds on that branch remain registered in BAR without promotion. I clarified this in b4ebf2f32 without narrowing the stage condition or changing publishing behavior.

We are also intentionally not adding dependencies on standard_tests or extended_tests: under Microsoft release policy, test stages must not block release publishing. Signing remains the required stage dependency.

Re-requesting review with those intended behaviors documented.

Android libraries ship from main; release branch real-sign eligibility does not make those branches publishing channels.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f43cbf0d-6b25-442c-bb49-409e3066d704
@jonathanpeppers

Copy link
Copy Markdown
Member Author

Correction after confirming the repository's release workflow: main is the only intended publishing branch for android-libraries. The release/* condition is legacy real-sign eligibility and does not imply those branches are shipping channels. It is therefore expected that release builds without mappings remain registered in BAR and unpromoted; no release mappings or condition changes are needed.

I reverted the overly broad documentation clarification in 17fc0ec87. The existing docs correctly scope the publishing mapping to main. The test-stage point likewise remains non-applicable because release publishing must not be blocked by test stages.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto stamp

@dalexsoto dalexsoto left a comment

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.

Stamping as requested by @jonathanpeppers; no code review performed.

@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) August 19, 2026 21:01
@jonathanpeppers
jonathanpeppers merged commit 50f7dbf into main Aug 19, 2026
2 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-enable-bar-publishing branch August 19, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants