Skip to content

[devops] Provision Xcode from an immutable Azure Artifacts package instead of Provisionator - #26309

Merged
dalexsoto merged 21 commits into
mainfrom
release-test/noprov
Jul 28, 2026
Merged

dalexsoto merged 21 commits into
mainfrom
release-test/noprov

Conversation

@dalexsoto

@dalexsoto dalexsoto commented Jul 26, 2026 •

Copy link
Copy Markdown
Member

Summary

CI gets Xcode from Provisionator today. That requires minting two read-only SAS tokens for the bosstoragemirror storage account through an Azure service connection, bootstrapping the Provisionator binary from that same account, and trusting whatever bundle comes back — nothing checks that the installed Xcode is the one Make.config asks for.

This replaces that with an immutable Azure Artifacts Universal Package (xcode-apple-silicon) pinned in Make.config, downloaded by the built-in UniversalPackages@0 task using the pipeline's own build identity, and installed by a repository-owned script that verifies it end to end.

No Azure subscription service connection, storage account, SAS token, GitHub PAT, or Provisionator bootstrap is involved any more, and no token is handed to a script.

Why

  • Reproducibility. The Xcode we build with is now a pinned, immutable coordinate (xcode-apple-silicon 26.6.0, build 17F113) that is verified against Make.config instead of an opaque .xip behind a mutable URL.
  • Fewer moving parts. The old path needed a service connection, a storage account with allowSharedKeyAccess=false, short-lived user-delegation SAS tokens, az on the agent, and the Provisionator channel. All of that is gone.
  • Verification. Nothing previously checked that the provisioned Xcode matched the pinned version. It does now, before anything privileged runs.
  • It works in both organizations. The same change has to run under DevDiv today and dnceng as that migration lands.

How Xcode is provisioned now

templates/common/provision-xcode.yml replaces templates/common/provision.yml:

  1. Resolve — require Apple silicon, read the pinned coordinates from Make.config, work out which project hosts the feed, and run install-xcode.sh verify. If the agent already has that exact Xcode, the download is skipped entirely.
  2. Download — UniversalPackages@0 fetches the package from the feed in the organization the build is running in. The task authenticates as the build identity through SYSTEMVSSCONNECTION, so no token is mapped into any step.
  3. Provision — run system-dependencies.sh, which hands the package to install-xcode.sh and then provisions Xcode components, simulators and build tools.
  4. Clean — remove the download, condition: always().

install-xcode.sh validates the package manifest (schema, size, SHA-256, Apple XIP signature), expands it with xip --expand, and checks the resulting bundle's identifier, marketing version, product build, host architecture, minimum macOS version and Apple code signature before anything privileged happens. It installs atomically with backup/rollback, then reconciles xcode-select, the /Applications/Xcode.app symlink, the Xamarin/MAUI AppleSdkRoot settings, the licence and first-launch state.

Trust is anchored in Apple's own signature and in the immutability of the feed version — not in the manifest that ships inside the package (which an attacker who could alter the payload could also alter).

Reusing an Xcode that is already installed

Bots frequently already have the Xcode we want, under a different name: we pin /Applications/Xcode_26.6.0.app and the bot has /Applications/Xcode_26.6.app. Before this, every agent downloaded and installed a multi-gigabyte Xcode that was already sitting on its disk.

When the configured path doesn't verify, install-xcode.sh now scans /Applications for a bundle that passes the same verification the configured path has to pass, and reuses the first match by symlinking the configured path at it. Everything that reads Make.config then keeps working untouched — this script, system-dependencies.sh, and plain make in the Windows reservation job, which never runs ./configure.

Guards, since this writes into a shared bot:

  • A candidate is only adopted when its name classifies the same stable/preview way as the configured name. Make.config derives XCODE_IS_STABLE from the application name alone, so adopting a differently-shaped name could publish a preview as stable.
  • Names are filtered so a Finder duplicate (Xcode_26.4.0 2.app) or an unrelated application can't win; symlinks are skipped; candidates are scanned in a stable order.
  • verify stays strictly read-only — it is the unprivileged probe that decides whether to download — so only reconcile and install create the symlink.
  • A real directory already at the configured path is never deleted; the normal install replaces it instead.

In practice 27 of 27 agents in a test run skipped the download.

Feed resolution: DevDiv and dnceng

The feed name and package name are identical in both organizations; only the organization and the project that hosts the feed differ:

Context Feed
DevDiv https://devdiv.visualstudio.com/DevDiv/_artifacts/feed/macios-tools-internal/UPack/xcode-apple-silicon/
dnceng https://dnceng.visualstudio.com/internal/_artifacts/feed/macios-tools-internal/UPack/xcode-apple-silicon/

resolve-xcode-package.sh takes the organization from SYSTEM_COLLECTIONURI and maps it to the project that owns the feed — devdiv → DevDiv, dnceng → internal — and publishes the result for the download task. Both the legacy <org>.visualstudio.com and modern dev.azure.com/<org> forms are accepted and normalised to one canonical endpoint per organization, so the result never depends on which form the agent happens to report.

Deriving the project from an explicit mapping rather than from System.TeamProject keeps the feed address independent of where the pipeline itself runs, and turns an unsupported organization into an actionable error instead of a confusing 404. The mapping is a default, not a policy: --organization, --project and --feed all override it, so another organization can be onboarded without touching the script.

Note that "dnceng" means the internal project. dnceng/public has no such feed and no access to it.

What this removes

  • templates/common/provision.yml (SAS minting + Provisionator bootstrap)
  • scripts/provisionator-bootstrap.sh
  • build-provisioning.csx, provision-xcode.csx, provision-brew-packages.csx, provision-shared.in.csx, and the provisioning make target that generated provision-shared.csx
  • The provisionatorChannel parameter and PROVISIONATOR_CHANNEL variable, threaded through every entry pipeline
  • ensure-xcode-select.sh — it hard-failed when /Applications/Xcode.app was missing, which blocked the installer that repairs exactly that state
  • The last use of the Xamarin - RelEng (BosStorageMirror-Contributor-MI) service connection from the macOS jobs

XCODE_URL stays in Make.config because local provisioning has no access to the internal feed. CI no longer reads it, and refuses to fall back to it under Azure Pipelines so the dependency can't quietly come back.

Behaviour changes worth reviewing

  • Provisioning is expressed once. Build and simulator tests previously ran Provisionator and then system-dependencies.sh with a different set of flags. They're now a single call that always passes --provision-xcode, so selection, the Xcode.app symlink, AppleSdkRoot and first-launch state are reconciled. That matters for the Windows reservation job, which deletes those settings immediately beforehand and previously never had them rewritten.
  • Brew packages. shellcheck, yamllint and p7zip move from the Provisionator brew step to --provision-shellcheck --provision-yamllint --provision-7z, which run the same brew install commands. azure-cli is dropped — it existed for the SAS generation this PR removes, and the only remaining macOS consumer of az (windows/generate-token.yml) installs it itself via azure-tools/az-client-update.yml@yaml-templates, before provisioning runs. It never depended on the brew-installed copy.
  • Coverage is a superset. The reservation job now also gets shellcheck/yamllint/7z, which it previously skipped. It still skips Xcode components, via a new provisionXcodeComponents parameter.
  • Apple silicon is now required and demanded. The package contains arm64 slices only. Jobs that provision Xcode gained an explicit macOS.Architecture -equals arm64 demand so an Intel agent is never scheduled, rather than failing once provisioning starts. The macOS test legs are unaffected — they never provision Xcode, so the x64 Sonoma leg keeps running on x64.
  • check_xcode now runs end to end on build bots for the first time. --ignore-all previously left IGNORE_XCODE=1; --provision-xcode now clears it. That newly enables install_coresimulator and the iPhoneSimulator/MacOSX/AppleTVOS SDK assertions on the build stage. Those SDKs ship inside the bundle, but a stale *_NUGET_OS_VERSION in Make.versions will now fail the build stage rather than only the tests.

Security posture

The old path used a short-lived, read-only, container-scoped SAS from a dedicated managed identity. The new path uses the pipeline's own build identity against a project-scoped feed, handled entirely by the UniversalPackages@0 task.

That identity was already exposed to PR-controlled steps on the untrusted macOS pool before this PR (build/build.yml, mac/build.yml, common/setup.yml all map System.AccessToken), so this doesn't create the exposure — but it does mean the token now also confers feed read access.

Secret handling was reviewed specifically:

  • No script receives a token. SYSTEM_ACCESSTOKEN is no longer mapped into any step of this template; the task uses SYSTEMVSSCONNECTION itself.
  • No new script or step enables set -x.

Prerequisites in Azure DevOps (not fixable in this repo)

  • Confirm the macios-tools-internal feeds have no upstream sources. The Build Service holds the AzDO-default Feed and Upstream Reader (Collaborator) role, which cannot publish — but it can save packages from an upstream, and an upstream that also serves xcode-apple-silicon would be the one route to shadowing the package.
  • Optionally downgrade the Build Service to Feed Reader on both feeds; downloading is all this needs.
  • Consider setting job authorization scope to current project for the DevDiv pipelines.
  • Keep pinned Xcode coordinates protected from retention deletion — Universal Package versions are immutable and cannot be republished once removed.

At the time of writing, both feeds exist and contain xcode-apple-silicon 26.6.0, and neither has retention enabled.

Reviewing this PR

Commits 1–7 are the original port, ordered so they can be read in sequence with no file split across commits:

  1. Add the pinned Xcode Universal Package and its installer — additive only; Make.config coordinates plus install-xcode.sh. Nothing calls them yet.
  2. Resolve the Xcode package feed per Azure DevOps organization — the DevDiv/dnceng mapping, in one file.
  3. Require Apple silicon for the macOS jobs that provision Xcode — pool demands, four one-line changes.
  4. Install Xcode from a Universal Package — the system-dependencies.sh changes.
  5. Provision Xcode from Azure Artifacts instead of Provisionator — the actual switch.
  6. Remove the Provisionator and BosStorageMirror plumbing — pure deletion of what 5 made unreferenced.
  7. Document artifact-based Xcode provisioning — README and the Xcode bump skill.

Commits 8–21 came out of CI and review. The ones that change the design rather than fix a detail:

  • 14 — reuse an Xcode already installed under another name (described above).
  • 15 — stop running ArtifactTool under Rosetta; it now ships an osx-arm64 build. Superseded by 16, which removes our copy of that logic entirely.
  • 16 — download with the built-in UniversalPackages@0 task instead of driving ArtifactTool ourselves. Deletes download-universal-package.sh; download-xcode-package.sh becomes resolve-xcode-package.sh since it no longer downloads.
  • 19 — always expand with xip --expand, deleting packagekit-extract.m and the runtime clang invocation.

Commits 17/18 and 20/21 are paired: each temporarily disables Xcode reuse so CI actually exercises the download-and-install path, then restores it once confirmed. They cancel out and can be read as no-ops.

Validation

  • shellcheck (0.10.0 and 0.11.0) and yamllint gates for tools/devops pass; bash -n clean on every changed script.
  • Zero new shellcheck warnings against a pristine origin/main baseline for system-dependencies.sh (two pre-existing warnings were removed).
  • Zero Azure Pipelines template-contract regressions, checked by parsing all 64 templates and diffing declared-vs-supplied parameters against a pristine origin/main baseline.
  • Feed resolution verified for all four organization URL forms plus the error paths (unknown organization, missing organization, malformed URL) and the --project/--feed overrides.
  • install-xcode.sh exercised locally: verify success and failure paths, the Make.config drift assertion, version/app-name derivation against the real Xcode_26.4.0, 26.5.0 and 27.0.0-beta4 bundles, and the reuse logic including both misclassification directions, the name filter, the symlink skip and all three adopt branches.
  • Reuse verified end to end by renaming a real Xcode_26.4.0.app to Xcode_26.4.app and confirming discovery found it without mutating anything.
  • Download and install confirmed on the bots, with reuse temporarily disabled so every agent ran them: the task selected artifacttool-osx-arm64, resolved feed macios-tools-internal, project DevDiv, pulled 2,318.5 MB in ~15s, then Installed Xcode 26.6.0 (17F113) and Selected Xcode 26.6.0 (17F113). ~3.5 min for a cold provision.
  • xip --expand compared against the previous PackageKit extractor on the real 2.3 GB archive: 113s vs 120s, 156,814 identical paths, same version and build, both bundles pass codesign --verify with the same team identifier. On the pipeline, expand-plus-install measured 2m18s against 2m36s.
  • The Command Line Tools catalog logic unit-tested across all branches (nothing pending, query timeout, exact match, near-miss 26.6.1, unrelated labels).

Known limitations

  • softwareupdate cannot report failure. It exits 0 for an unknown label, an invalid flag and a failed query, and can hang when the update service is unreachable. Command Line Tools installation is therefore best-effort: the catalog query is bounded with a timeout and decided from its contents, and the log says "could not confirm" rather than claiming Apple doesn't offer the label, because a reachable-but-empty catalog is genuinely indistinguishable from a failed query.
  • The first run on any bot whose /Applications/Xcode_<version>.app is a symlink to something that fails verification will reinstall Xcode, because the installer requires a real bundle at the target.
  • install-xcode.sh refuses to replace a real directory at /Applications/Xcode.app; it only manages that path as a symlink.
  • The dnceng feed path is unit-tested but has not yet been exercised by a real download, since these pipelines run under DevDiv.

Rollback

Revert the whole range. Commits 5 and 6 are the behavioural switch; 1–4 are inert without them.

dalexsoto and others added 7 commits July 26, 2026 09:15
CI currently gets Xcode through Provisionator, which needs a read-only SAS
token for the BosStorageMirror storage account. Neither the token nor the
storage account is something this repository can reason about, and the
downloaded bundle is never checked against what Make.config expects.

Pin the Xcode we build with as an immutable Azure Artifacts Universal Package
instead, and add the repository-owned tooling that installs it:

* Make.config gains XCODE_PACKAGE_FEED, XCODE_PACKAGE_NAME,
  XCODE_PACKAGE_VERSION and XCODE_BUILD_VERSION next to XCODE_VERSION.
  XCODE_URL stays for local provisioning, which has no access to the feed.
* install-xcode.sh verifies a package (manifest schema, size, SHA-256 and
  Apple XIP signature), installs it atomically with a backup/rollback, and
  reconciles selection, the Xcode.app symlink, the Xamarin/MAUI AppleSdkRoot
  settings, the licence and first-launch state. It refuses to run when
  XCODE_DEVELOPER_ROOT and XCODE_PACKAGE_VERSION disagree.
* packagekit-extract.m expands the Apple-signed XIP through the same
  PackageKit API Archive Utility uses. It is a private framework, so
  install-xcode.sh falls back to 'xip --expand' if it ever stops working.
* download-universal-package.sh downloads a Universal Package with the Azure
  DevOps ArtifactTool. ArtifactTool has no native macOS arm64 build, so the
  osx-x64 release is run explicitly under Rosetta. Downloads are staged in a
  sibling directory and renamed only on success, so they are retry-safe.

Trust is anchored in Apple's own signature and in the immutability of the
feed version, not in the manifest that travels inside the package.

Nothing calls these yet; this commit only adds them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
The Xcode Universal Package lives in a 'macios-tools-internal' feed that
exists in more than one Azure DevOps organization, with the same feed name and
the same package name but a different host project:

  DevDiv: https://devdiv.visualstudio.com/DevDiv/_artifacts/feed/macios-tools-internal/UPack/xcode-apple-silicon/
  dnceng: https://dnceng.visualstudio.com/internal/_artifacts/feed/macios-tools-internal/UPack/xcode-apple-silicon/

Add download-xcode-package.sh, which reads the pinned coordinates from
Make.config, takes the organization from SYSTEM_COLLECTIONURI, and maps it to
the project that owns the feed: 'devdiv' to 'DevDiv' and 'dnceng' to
'internal'. Both the legacy '<org>.visualstudio.com' and the modern
'dev.azure.com/<org>' forms are accepted and normalised to a single canonical
endpoint per organization, so the result doesn't depend on which form the
agent happens to report.

Deriving the project from a mapping rather than from System.TeamProject keeps
the feed address independent of where the pipeline itself runs, and turns an
unsupported organization into an actionable error instead of a confusing 404.
The mapping is only a default: --organization, --project and --feed all
override it, so another organization can be onboarded without touching this
script. Note that 'dnceng' means the 'internal' project; 'public' has no
access to this feed.

--print exposes each resolved value so the resolution can be checked without
downloading anything.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
The pinned Xcode package is 'xcode-apple-silicon' and contains arm64 slices
only, so the jobs that provision Xcode have to run on Apple silicon.

The jobs that expand build/build.yml only demanded a macOS name, which is
Apple silicon in practice (Tahoe dropped Intel) but was never stated. Add an
explicit 'macOS.Architecture -equals arm64' demand so an Intel agent is never
scheduled in the first place, rather than failing once provisioning starts.

This matches what the simulator test and Windows reservation jobs already
demand. The ACES branches are left alone: they select an image directly, and
that image is Apple silicon.

The macOS test legs are unaffected. They never provision Xcode, so the x64
Sonoma leg keeps running on x64.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Teach ./system-dependencies.sh to install Xcode through install-xcode.sh so
that CI and local provisioning share one implementation.

* --xcode-package-directory points at a downloaded Universal Package.
  install_specific_xcode hands it to install-xcode.sh, which validates it
  before anything privileged happens.
* Without a package, the XCODE_URL archive is still downloaded for local
  provisioning, but it is now installed through the same code path. The curl
  invocation gained --fail and retries so a failed download stops being an
  HTML error page saved as a .xip. DMGs are no longer supported; Apple ships
  XIPs.
* check_specific_xcode replaces the "does the directory exist" test with
  'install-xcode.sh verify', which also checks the product build, the bundle
  identity, the host architecture, the minimum macOS version and the Apple
  code signature, and then reconciles selection when provisioning. The probe
  is quiet so the ordinary "not installed yet" case doesn't look like an
  error, and is repeated verbosely before failing so the real reason is
  visible.
* get_xcode_developer_root reads Make.config directly while provisioning.
  install-xcode.sh is driven by Make.config, so honouring an inherited
  variable or a stale configure.inc here made the rest of the script inspect
  a different Xcode than the one that was just installed and selected.
  Without --provision-xcode, configure.inc is still honoured, so
  './configure --xcode=...' keeps working locally.
* Under Azure Pipelines, refuse to fall back to the XCODE_URL download. That
  dependency is what the Universal Package replaces and there are no
  credentials for it in CI, so it would otherwise fail obscurely much later.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Replace common/provision.yml, which minted two read-only BosStorageMirror SAS
tokens through an Azure service connection and then ran the Provisionator
bootstrap, with common/provision-xcode.yml.

The new template resolves the pinned package, skips the download when the
agent already has that exact Xcode, downloads it from the feed belonging to
the organization the build runs in, and then runs system-dependencies.sh. It
authenticates with the pipeline's own build identity, so no Azure
subscription service connection, storage account, SAS token or GitHub PAT is
involved. System.AccessToken is mapped into the download step only, and no
step in the template enables 'set -x'.

Provisioning is now expressed once instead of being split between a
Provisionator run and a second system-dependencies.sh call:

* Build and simulator tests previously ran Provisionator and then
  system-dependencies.sh with a different set of flags. Both are now a single
  call that always passes --provision-xcode, so selection, the Xcode.app
  symlink, the AppleSdkRoot settings and first-launch state are reconciled.
  This matters for the Windows reservation job, which deletes those settings
  immediately beforehand.
* shellcheck, yamllint and p7zip move from the Provisionator brew step to
  --provision-shellcheck, --provision-yamllint and --provision-7z, which run
  the same brew commands. azure-cli is dropped: it was there for the SAS
  generation this commit removes, and the only remaining macOS consumer of
  'az' installs it itself, before provisioning.
* The Windows reservation job keeps skipping Xcode components via the new
  provisionXcodeComponents parameter, and still provisions after the agent
  has been taken out of its pool.
* mac/build.yml's Provisionator call was disabled and is deleted outright.

The template takes the checkout path as a parameter because the callers don't
agree on Build.SourcesDirectory versus System.DefaultWorkingDirectory.

Two steps that existed only to keep Provisionator working are removed: the
'make provisioning' generation steps, and the guards that required
xcode-select to already point at an Xcode. ensure-xcode-select.sh goes with
them, since it hard-failed when /Applications/Xcode.app was missing, which
blocked the installer that repairs exactly that state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Nothing runs Provisionator any more, so delete what was left behind:

* provisionator-bootstrap.sh, which downloaded the Provisionator archive from
  the BosStorageMirror storage account using a SAS token.
* build-provisioning.csx, provision-xcode.csx, provision-brew-packages.csx
  and provision-shared.in.csx, together with the 'provisioning' make target
  that generated provision-shared.csx from Make.config, and the .gitignore
  entries for the generated files.
* The provisionatorChannel parameter and the PROVISIONATOR_CHANNEL variable,
  which were threaded from the entry pipelines all the way down to the
  provisioning steps.

This also removes the last use of the
'Xamarin - RelEng (BosStorageMirror-Contributor-MI)' service connection from
the macOS jobs.

XCODE_URL still points at BosStorageMirror because local provisioning has no
access to the internal feed; CI no longer reads it.

The cleanup steps that delete ~/Library/Caches/com.xamarin.provisionator are
intentionally kept, so bots that were provisioned by the old tooling still get
that cache removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Update the two places that still described the Provisionator flow:

* tools/devops/README.md drops the provisionatorChannel parameter and
  replaces the 'provisionator@2 task -> build-provisioning.csx' node in the
  build step graph with the new template and the scripts it calls.
* The Xcode bump skill now collects the Azure Artifacts package version and
  the product build version, sets XCODE_PACKAGE_NAME, XCODE_PACKAGE_VERSION
  and XCODE_BUILD_VERSION, and points out that XCODE_DEVELOPER_ROOT has to
  name the application XCODE_PACKAGE_VERSION implies, because install-xcode.sh
  refuses to run when the two disagree.

The skill also gains the step that is easiest to forget: the matching package
has to exist in both the DevDiv and the dnceng feed before CI is queued, since
each pipeline resolves the same coordinates in its own organization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Copilot AI review requested due to automatic review settings July 26, 2026 13:20
@dalexsoto
dalexsoto requested a review from rolfbjarne as a code owner July 26, 2026 13:20

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 replaces macOS CI Xcode provisioning via Provisionator + BosStorageMirror SAS tokens with a repo-owned, end-to-end verified install flow that downloads an immutable Azure Artifacts Universal Package pinned in Make.config.

Changes:

  • Add Azure Artifacts Universal Package download + Xcode install/verify scripts and a new provision-xcode.yml template.
  • Switch build/test/reservation pipelines to the new provisioning template, remove Provisionator plumbing (templates, bootstrap, csx generation).
  • Require Apple silicon agents for jobs that provision Xcode and wire the new pinned package coordinates into Make.config.

Reviewed changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/devops/README.md Updates pipeline/provisioning flow documentation to reflect new template + scripts.
tools/devops/provision-xcode.csx Removes legacy Provisionator csx entrypoint.
tools/devops/provision-shared.in.csx Removes legacy Provisionator helper logic (Xcode select, brew packages, VSMac settings).
tools/devops/provision-brew-packages.csx Removes legacy Provisionator brew provisioning csx.
tools/devops/Makefile Removes csx generation target previously required for Provisionator.
tools/devops/build-provisioning.csx Removes legacy Provisionator build provisioning script.
tools/devops/automation/templates/windows/reserve-mac.yml Switches reservation job to provision-xcode.yml and unifies provisioning steps.
tools/devops/automation/templates/variables/common.yml Removes Provisionator channel variable plumbing.
tools/devops/automation/templates/tests/build.yml Switches test build provisioning to provision-xcode.yml.
tools/devops/automation/templates/tests-stage.yml Removes Provisionator channel parameter from stage contract.
tools/devops/automation/templates/pipelines/run-tests-pipeline.yml Removes Provisionator channel parameter threading.
tools/devops/automation/templates/pipelines/build-pipeline.yml Removes Provisionator channel parameter threading.
tools/devops/automation/templates/pipelines/api-diff-pipeline.yml Removes Provisionator channel parameter threading.
tools/devops/automation/templates/main-stage.yml Removes Provisionator channel parameter from main stage contract.
tools/devops/automation/templates/mac/build.yml Removes Provisionator-related cache-clearing and disabled brew provisioning template usage.
tools/devops/automation/templates/common/setup.yml Removes ensure-xcode-select.sh call; defers selection to Xcode provisioning template.
tools/devops/automation/templates/common/provision.yml Deletes legacy Provisionator + SAS token provisioning template.
tools/devops/automation/templates/common/provision-xcode.yml Adds new unified Xcode + dependency provisioning template (resolve/download/provision/clean).
tools/devops/automation/templates/build/build.yml Switches build stage to provision-xcode.yml and removes legacy provisioning steps.
tools/devops/automation/templates/build/build-stage.yml Adds arm64 demand for jobs that provision Xcode.
tools/devops/automation/templates/build/build-mac-tests-stage.yml Adds arm64 demand for jobs that provision Xcode in mac tests build stage.
tools/devops/automation/templates/build/api-diff-stage.yml Adds arm64 demand for API diff stage provisioning legs.
tools/devops/automation/templates/api-diff-stage.yml Removes Provisionator channel parameter from API diff stage contract.
tools/devops/automation/scripts/provisionator-bootstrap.sh Deletes Provisionator bootstrap script.
tools/devops/automation/scripts/bash/packagekit-extract.m Adds PackageKit-based signed XIP extraction helper (with runtime fallback in installer).
tools/devops/automation/scripts/bash/install-xcode.sh Adds Xcode package validation, install, selection reconciliation, and verification logic.
tools/devops/automation/scripts/bash/ensure-xcode-select.sh Deletes legacy “ensure xcode-select” helper.
tools/devops/automation/scripts/bash/download-xcode-package.sh Adds org→project feed resolution and wrapper around universal package downloader.
tools/devops/automation/scripts/bash/download-universal-package.sh Adds ArtifactTool bootstrap + universal package download implementation.
tools/devops/automation/scripts/.gitignore Removes ignore for legacy Provisionator extraction directory.
tools/devops/automation/run-nightly-codeql.yml Adds arm64 demand for CodeQL job that provisions Xcode.
tools/devops/automation/build-pull-request.yml Removes Provisionator channel parameter from PR entry pipeline.
tools/devops/automation/build-pipeline.yml Removes Provisionator channel parameter from CI entry pipeline.
system-dependencies.sh Adds Xcode package directory support and routes installs/verifications through install-xcode.sh.
Make.config Pins Xcode universal package coordinates + build version; documents new CI provisioning source.
.gitignore Removes legacy Provisionator/generated csx ignore entries.
.agents/skills/macios-xcode-beta-update/SKILL.md Updates Xcode bump skill to include package/build coordinates and new constraints.

Comment thread system-dependencies.sh Resolved
@vs-mobiletools-engineering-service2

This comment has been minimized.

The Linux build verification leg runs 'make -C tools/devops check-sh', which
invokes whatever shellcheck the agent happens to have; no version is pinned.

install_archive's trap handler is only reached through 'trap', which
shellcheck cannot see from inside a subshell function, so it reports the whole
handler as unreachable. Newer shellchecks call that SC2329, which was already
silenced; the version on the Linux agent calls it SC2317, which was not, so
check-sh failed with 15 findings.

Silence both codes and say why. Verified by reproducing the exact 15 SC2317
findings with shellcheck 0.10.0 and confirming they are gone, while
shellcheck 0.11.0 still reports nothing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@dalexsoto
dalexsoto enabled auto-merge (squash) July 27, 2026 02:05
dalexsoto and others added 5 commits July 26, 2026 22:33
binary_architectures parsed the summary line 'file' prints for a universal
binary. That line only spells out the slices 'file' could reach in its read
buffer and abbreviates the rest, so a large binary is described as

    Mach-O universal binary with 2 architectures: [x86_64:Mach-O ...] [arm64e]

and the abbreviated slices were dropped. Reproduced with /usr/lib/dyld, where
the old parser reported 'x86_64' while lipo reports 'x86_64 arm64e'.

The consequence is latent while the pinned Xcode is arm64-only, but a universal
Xcode would be reported as x86_64-only and rejected on an arm64 host with a
misleading "cannot execute natively on arm64" error, blocking provisioning.

Parse the per-architecture lines underneath the summary instead: those are
always complete. Verified against lipo for large and small universal binaries,
arm64-only Xcode bundles, non-Mach-O files and missing files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
XCODE_VERSION only ever carries a major and a minor version, but the package
version carries the patch component too. The repository has shipped exactly
that combination three times recently: XCODE_VERSION=26.0 with Xcode_26.0.1.app,
26.1 with Xcode_26.1.1.app, and 26.4 with Xcode_26.4.1.app.

install-xcode.sh compared the two normalised versions for exact equality, so
'26.4' and '26.4.1' were treated as different Xcode releases and the script
refused to run at all. The next patch bump would have failed every job before
anything was even downloaded.

Compare only the major and minor versions here. The full package version is
still matched exactly against the package manifest and against the installed
bundle's marketing version, and XCODE_BUILD_VERSION is still matched exactly,
so this doesn't weaken what is actually verified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Two problems with the command line tools step.

The catalog query discarded stderr, but softwareupdate splits its output
between both streams, so the label list could be thrown away and the function
would always report that it couldn't confirm the label. Capture both streams.

The install itself was then unbounded and unchecked. Bounding only the query
doesn't help: proving the catalog is reachable doesn't stop a multi-gigabyte
download from stalling, and because the install was the last command in the
function a failure propagated out through reconcile_xcode and aborted the
whole installation under 'set -e'. That contradicts treating the command line
tools as an addition to what the Xcode package already provides.

Bound the install with the same alarm the query uses, generously enough not to
interrupt a legitimately slow install, and log and continue when it doesn't
complete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
tests-stage.yml declares its own build_packages job, which expands
build/build.yml and therefore provisions the arm64-only Xcode package, but its
pool was missed when the architecture demand was added to the other
provisioning jobs.

Add the same 'macOS.Architecture -equals arm64' demand so this job can't be
scheduled on an Intel agent and fail once provisioning starts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
…rules

download-universal-package.sh read the value of every option without checking
that one was actually present, so under 'set -u' a trailing valueless flag
failed with 'unbound variable' instead of a usage message. Group the
value-taking options and check arity the way the sibling wrapper already does.

Document the Xcode naming rules in the bump skill as a table. The package
version is strict SemVer because Azure Artifacts requires it, while the
application name follows this repository's own convention, so the two are
deliberately spelled differently: betas drop the dot before the ordinal,
release candidates keep it, and the first beta or RC has no ordinal at all.
Xcode_26.3.0-rc2.app has been written twice and corrected both times, which is
what install-xcode.sh's consistency check exists to catch.

Also record that XCODE_VERSION keeps only the major and minor version for a
patch release, and that XCODE_BUILD_VERSION is what actually distinguishes one
beta or RC from the next.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne 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.

Sometimes a bot may have the Xcode we want installed, but using a different naming scheme than we expect (say we expect Xcode 26.2 in /Applications/Xcode_26.2.0.app and it's actually in /Applications/Xcode_26.2.app).

I might be wrong, but it doesn't seem like this code handles this situation, and will instead redownload and reinstall Xcode using the expected path, instead of re-using the already installed Xcode.

So an improvement could be to search all /Applications/Xcode*.app (non-symlink) bundles, and use any matching the exact version we're looking for.

A bot often already has exactly the Xcode we want, just not at the path
Make.config names: we pin Xcode_26.2.0.app and the bot has Xcode_26.2.app.
Until now that meant downloading and installing another multi-gigabyte copy of
an Xcode that was already sitting there.

Look for it instead. When the configured path doesn't verify, scan
/Applications for a bundle that passes the same verification the configured
path has to pass -- marketing version, exact product build, bundle identifier,
architecture, minimum macOS and Apple code signature -- and reuse the first
match.

Reuse works by pointing the configured path at the bundle we found. Everything
that reads Make.config then keeps working untouched: this script,
system-dependencies.sh, and plain 'make' in the Windows reservation job, which
never runs ./configure and would otherwise decide Xcode isn't installed at all.

Details worth knowing:

* Candidates are scanned in a stable order, symlinks are skipped, and names
  are filtered so a Finder duplicate ("Xcode_26.4.0 2.app") or an unrelated
  application can't be picked up. ./configure also rejects paths with spaces.
* A candidate is only reused when its name classifies the same way as the
  configured name. Make.config decides XCODE_IS_STABLE from the application
  name alone, so adopting a differently-shaped name could publish a preview as
  stable, which is the direction Make.config explicitly warns about.
* 'verify' stays read-only: it is the unprivileged probe that decides whether
  to download, so only 'reconcile' and 'install' create the symlink.
* If something real already occupies the configured path, we refuse to touch
  it and let the normal install replace it, rather than deleting a bundle that
  someone else put there.
* 'install' now always targets the literal configured path. It used to
  canonicalise first, which meant an install could overwrite a bundle we had
  only borrowed through the symlink.

Reported by rolfbjarne.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
@dalexsoto dalexsoto added the ready-to-review This PR is ready to review/merge. label Jul 27, 2026
This reverts the temporary commit that disabled reuse. It did its job: with
reuse off, every agent went through the new code path and it worked.

The task fetched artifacttool-osx-arm64 (no Rosetta anywhere), resolved the feed
to the DevDiv project, downloaded all 2,318.5 MB of xcode-apple-silicon 26.6.0
in about fifteen seconds, expanded the archive and installed it:

  Installed Xcode 26.6.0 (17F113) in '/Applications/Xcode_26.6.0.app'.
  Selected Xcode 26.6.0 (17F113).

Roughly three and a half minutes end to end for a cold provision. Reuse is back
on, so agents that already have the bundle skip all of it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
@vs-mobiletools-engineering-service2

This comment has been minimized.

@dalexsoto
dalexsoto requested a review from rolfbjarne July 27, 2026 17:58
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [CI Build #3c9246c] Prepare .NET Release succeeded ✅

📦 Published NuGet packages (32 packages)

iOS

  • Microsoft.iOS.Ref.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Runtime.ios-arm64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Runtime.ios.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Runtime.iossimulator-arm64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Runtime.iossimulator-x64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Sdk.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Templates.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.iOS.Windows.Sdk.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.NET.Sdk.iOS.Manifest-10.0.400-preview.0.26.5.10581-ci.release-test-noprov.nupkg

MacCatalyst

  • Microsoft.MacCatalyst.Ref.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.MacCatalyst.Runtime.maccatalyst-arm64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.MacCatalyst.Runtime.maccatalyst-x64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.MacCatalyst.Runtime.maccatalyst.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.MacCatalyst.Sdk.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.MacCatalyst.Templates.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.NET.Sdk.MacCatalyst.Manifest-10.0.400-preview.0.26.5.10581-ci.release-test-noprov.nupkg

macOS

  • Microsoft.macOS.Ref.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.macOS.Runtime.osx-arm64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.macOS.Runtime.osx-x64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.macOS.Runtime.osx.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.macOS.Sdk.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.macOS.Templates.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.NET.Sdk.macOS.Manifest-10.0.400-preview.0.26.5.10581-ci.release-test-noprov.nupkg

tvOS

  • Microsoft.NET.Sdk.tvOS.Manifest-10.0.400-preview.0.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Ref.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Runtime.tvos-arm64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Runtime.tvos.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Runtime.tvossimulator-arm64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Runtime.tvossimulator-x64.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Sdk.net10.0_26.5.26.5.10581-ci.release-test-noprov.nupkg
  • Microsoft.tvOS.Templates.26.5.10581-ci.release-test-noprov.nupkg

Other

  • Sharpie.Bind.Tool.26.6.0.185-ci.release-test-noprov.nupkg

Pipeline on Agent
Hash: 3c9246c2e54030015c7fbc6f6dea36825136b5f7 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

dalexsoto and others added 2 commits July 28, 2026 06:15
Two extractors, where the preferred one compiled an Objective-C file against a
private framework at runtime and the other was the supported tool it fell back
to. Keep only the supported one.

The private path existed on the theory that PackageKit, being what Archive
Utility itself uses, would be better. Measured against the real 2.3 GB archive
it simply isn't:

                   time    entries    signature
  PackageKit       120s    156,814    valid
  xip --expand     113s    156,814    valid

Identical path sets, identical version and build, both bundles pass
'codesign --verify' with the same team identifier. xip is marginally faster and
cannot break when an OS update changes a private interface that we redeclare by
hand.

Dropping it loses nothing on the security side either: the archive's Apple
signature is checked by 'pkgutil --check-signature' before extraction, and the
resulting bundle is checked again afterwards. Neither depends on the extractor.

xip is also a plain binary rather than an xcrun shim, so it still works while
'xcode-select' points at the Xcode we are replacing, which is why it is safe to
rely on as the only path.

Suggested by rolfbjarne.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
The extractor changed, and with reuse on every agent skips the install, so
nothing would exercise it. Same trick as last time: turn reuse off, let a full
download and install run everywhere, then revert once it is confirmed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
@vs-mobiletools-engineering-service2

This comment has been minimized.

This reverts the temporary commit that disabled reuse. With reuse off every
agent did a full install, which is what confirms the xip-only extractor:

  Expanding 'Xcode_26.6_Apple_silicon.xip' on the /Applications volume.
  Installed Xcode 26.6.0 (17F113) in '/Applications/Xcode_26.6.0.app'.
  Selected Xcode 26.6.0 (17F113).

No trace of the old extractor in the logs, and expanding plus installing took
2m18s against 2m36s for the PackageKit path on the same pipeline yesterday, so
the small win measured locally holds on the bots too.

Reuse is back on, so agents that already have the bundle skip all of it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 2263842d6db7a82b36dd592eb7b01c04721d3f00 [PR build]

@rolfbjarne rolfbjarne 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.

Looks good! Just one minor thing (not holding up the review for this): it would be nice if the PR description was accurate with the regards to the current changes in the PR.

@dalexsoto

Copy link
Copy Markdown
Member Author

Thanks! Description rewritten to match what the PR actually does now.

What was stale and is now fixed:

  • It still described a hand-rolled downloader with SYSTEM_ACCESSTOKEN scoped into one step. That is gone — UniversalPackages@0 authenticates as the build identity, and no script receives a token at all now, so the security section says that instead.
  • It referenced download-universal-package.sh and download-xcode-package.sh. The first is deleted; the second is resolve-xcode-package.sh, since it only resolves the project/feed now.
  • packagekit-extract.m appeared in the commit guide, the validation list and as a "known limitation" about private frameworks. All three are gone; the limitation was removed rather than reworded, because it no longer exists.
  • The commit guide claimed seven commits. There are 21, so it now reads as "1–7 are the port, 8–21 came out of CI and review", calls out the four that change the design, and notes that 17/18 and 20/21 are the paired temporary-disable commits that cancel out.

I also added a section for the Xcode reuse behaviour, which had no coverage at all, and folded in the measured evidence — the 27/27 reuse rate, the cold-provision numbers from the bots, and the xip-vs-PackageKit comparison.

Two limitations I added rather than removed, since they are real and were previously unstated:

  • the dnceng feed path is unit-tested but has not been exercised by a real download, because these pipelines run under DevDiv;
  • the symlink caveat was slightly wrong — it only forces a reinstall when the symlink target fails verification, not merely because it is a symlink.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #2263842] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 203 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 2263842d6db7a82b36dd592eb7b01c04721d3f00 [PR build]

@dalexsoto
dalexsoto merged commit fcc1dff into main Jul 28, 2026
62 of 64 checks passed
@dalexsoto
dalexsoto deleted the release-test/noprov branch July 28, 2026 13:07
dalexsoto added a commit that referenced this pull request Jul 28, 2026
…rtifacts package instead of Provisionator (#26329)

Backport of #26309 to `release/10.0.1xx`.

Cherry-picked from `fcc1dffc8417462c562c4b360d2720d5d5f1ef83` with `-x`.
See the original PR for the full rationale; this description covers only
what the backport had to resolve.

# What this does

Replaces Provisionator with an immutable **Azure Artifacts Universal
Package** (`xcode-apple-silicon`) pinned in `Make.config`, downloaded by
the built-in `UniversalPackages@0` task using the pipeline's own build
identity, and installed by a repository-owned script that verifies it
end to end.

No Azure subscription service connection, storage account, SAS token,
GitHub PAT, or Provisionator bootstrap is involved any more, and no
token is handed to a script. The feed is resolved per organization —
`devdiv` → `DevDiv`, `dnceng` → `internal`.

# Conflicts resolved

Four, all caused by `release/10.0.1xx` being behind `main` on unrelated
changes rather than by the backported work itself.

**`tools/devops/automation/templates/common/provision.yml`** and
**`tools/devops/provision-shared.in.csx`** — modify/delete. Both are
deleted by this change. The branch's only divergence in them was that it
lacked two `main`-only fixes (a `retryCountOnTaskFailure` on the
SAS-token task, and a `try`/`catch` around `ListXcodes`), and both files
disappear entirely, so the deletions were taken.

**`.gitignore`** — the branch still carries `bcl-test-importer` and the
bcl-test entries that `main` has since dropped. Kept the branch's
entries and applied only this change's deletion of
`provisionator.msbuild.props`.

**`tools/devops/Makefile`** — this one mattered. `main` has migrated
`LocProject.json` to `generate-loc-project.sh`, which **does not exist
on this branch**, so taking `main`'s side would have broken `make` in
`tools/devops`. Kept the branch's existing `LocProject.json.in` rule and
removed only the `provision-shared.csx` rule and the `provisioning:`
target.

# Verification

- The three files this change owns outright — `install-xcode.sh`,
`resolve-xcode-package.sh` and `provision-xcode.yml` — are
**byte-identical to `main`**.
- **The backport introduces no new divergence from `main`.** For all
nine files that still differ, the difference is exactly the divergence
that already existed between the branches before the cherry-pick,
compared content-line by content-line.
- No dangling references remain to any removed file or variable
(`provision.yml`, `provisionator-bootstrap.sh`, `provision-shared`, the
`.csx` scripts, `provisionatorChannel`, `PROVISIONATOR_CHANNEL`,
`ensure-xcode-select.sh`).
- Template parameter contracts check out: every parameter supplied at
the three `provision-xcode.yml` call sites is declared, and every `${{
parameters.* }}` reference resolves.
- Gates pass: `shellcheck` 0.10.0 **and** 0.11.0, `yamllint` (both the
config and GitHub-Actions forms), `bash -n` on every changed script, and
`tools/devops/Makefile` still parses.
- Smoke-tested on this branch: `Make.config` resolves
`XCODE_PACKAGE_VERSION=26.6.0`, `XCODE_BUILD_VERSION=17F113` and derives
`XCODE_IS_STABLE=true`; `install-xcode.sh verify` runs; the resolver
still maps `devdiv` → `DevDiv` and `dnceng` → `internal`.

The Xcode pinned here is the same as on `main` (`26.6` / `26.6.0` /
`17F113`), so no coordinate adaptation was needed.

# Worth watching in CI

`--provision-xcode` clears `IGNORE_XCODE`, so `check_xcode` now runs end
to end on build bots. That newly enables the
`iPhoneSimulator`/`MacOSX`/`AppleTVOS` SDK assertions on the build
stage, which means **a stale `*_NUGET_OS_VERSION` in `Make.versions`
will fail the build stage rather than only the tests**. Relevant here
because this branch tracks a different set of .NET 10 package versions
than `main`.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e134d13d-5eee-4266-ba75-24422addd02b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot ready-to-review This PR is ready to review/merge.

Projects

None yet

4 participants