Skip to content

{CI} Switch docs reference trigger to tag trigger#33655

Open
wangzelin007 wants to merge 1 commit into
Azure:devfrom
wangzelin007:switch-docs-trigger-to-tag
Open

{CI} Switch docs reference trigger to tag trigger#33655
wangzelin007 wants to merge 1 commit into
Azure:devfrom
wangzelin007:switch-docs-trigger-to-tag

Conversation

@wangzelin007

Copy link
Copy Markdown
Member

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 the release branch at release time:

  • It fast-forwards main onto release (git merge --no-edit --ff-only release, then pushes main) — that updates main, not release.
  • The actual publish step creates a GitHub Release via the API:
    POST /repos/Azure/azure-cli/releases
    { "tag_name": "azure-cli-<ver>", "target_commitish": "release" | "release-lts-<ver>", ... }
    
    which creates a Release + tag — it pushes no commit to release.

So release gets 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 on release: [released], not on a branch push.)

How — trigger on the release tag, resolve latest/LTS by lookup

  • Trigger on tags matching azure-cli-* (the tag the release process creates).
  • A tag doesn't carry target_commitish, and latest/LTS tags are both azure-cli-x.y.z (indistinguishable by name). So the script looks up the GitHub Release for the tag and reads target_commitish (release → latest, release-lts-<ver> → LTS) — the same signal the old Action used.
  • If no Release is found for the tag (e.g. a test tag), it defaults to latest.

What — behavior after this change

  • On each release (a azure-cli-<version> Release/tag is created), the pipeline fires, resolves latest vs LTS via target_commitish, and queues the matching docs reference CI (ADO_DocsReference_Latest_Pipeline_ID / ADO_DocsReference_LTS_Pipeline_ID).
  • Timing matches the old release: [released] Action — both originate from the same "create release tag" step; the difference is seconds, negligible.
  • The old GitHub Action can then be retired.

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 from dev).
  • release-lts-2.66 (and future LTS branches): cherry-pick this file once; future LTS branches cut from dev will already include it.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 26, 2026

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @wangzelin007,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 26, 2026

Copy link
Copy Markdown
️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan

yonzhan commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

CI

@wangzelin007 wangzelin007 marked this pull request as ready for review June 29, 2026 02:12
Copilot AI review requested due to automatic review settings June 29, 2026 02:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Azure Pipelines workflow that triggers the Microsoft Learn reference-docs CI so it runs on release tags (azure-cli-*) instead of branch pushes, and determines latest vs LTS by querying the GitHub Release target_commitish for the tag.

Changes:

  • Switch pipeline triggering from release / release-lts-* branch triggers to azure-cli-* tag triggers.
  • Remove the job condition that previously filtered on branch name (no longer needed with tag-only triggering).
  • Add a GitHub Releases API lookup to derive target_commitish and route to the correct ADO docs pipeline (latest vs LTS).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .azure-pipelines/trigger-reference-docs-ci.yml
Comment thread .azure-pipelines/trigger-reference-docs-ci.yml
Comment thread .azure-pipelines/trigger-reference-docs-ci.yml Outdated
@wangzelin007 wangzelin007 force-pushed the switch-docs-trigger-to-tag branch from 6463dc8 to f71f435 Compare June 29, 2026 02:50
@naga-nandyala naga-nandyala self-requested a review June 29, 2026 03:08

@naga-nandyala naga-nandyala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants