{CI} Switch docs reference trigger to tag trigger#33655
Draft
wangzelin007 wants to merge 1 commit into
Draft
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @wangzelin007, |
️✔️AzureCLI-BreakingChangeTest
|
Collaborator
|
CI |
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.
Summary
Switch the docs reference CI trigger pipeline from a branch CI trigger to a tag trigger, and derive latest-vs-LTS by looking up the release's
target_commitish.Why — a branch trigger can't fire on release
The previous version triggered on pushes to
release/release-lts-*. But the azure-cli release process does not push a commit onto thereleasebranch at release time:mainontorelease(git merge --no-edit --ff-only release, then pushesmain) — that updatesmain, notrelease.release.So
releasegets no new commit during a release; the only thing that actually happens is a tag/Release being created. A branch CI trigger therefore never fires. (This is also why the old GitHub Action listened onrelease: [released], not on a branch push.)How — trigger on the release tag, resolve latest/LTS by lookup
azure-cli-*(the tag the release process creates).target_commitish, and latest/LTS tags are bothazure-cli-x.y.z(indistinguishable by name). So the script looks up the GitHub Release for the tag and readstarget_commitish(release→ latest,release-lts-<ver>→ LTS) — the same signal the old Action used.What — behavior after this change
azure-cli-<version>Release/tag is created), the pipeline fires, resolves latest vs LTS viatarget_commitish, and queues the matching docs reference CI (ADO_DocsReference_Latest_Pipeline_ID/ADO_DocsReference_LTS_Pipeline_ID).release: [released]Action — both originate from the same "create release tag" step; the difference is seconds, negligible.Prerequisite
The tag points at the HEAD of
release/release-lts-*, and ADO evaluates the tag commit's YAML, so this file must exist on those branches:release: comes for free on the next release cut (it's cut fromdev).release-lts-2.66(and future LTS branches): cherry-pick this file once; future LTS branches cut fromdevwill already include it.