Skip to content

Commit eaf548c

Browse files
authored
Release/CI pipeline updates + feed warm-up (#16359)
* Release/CI pipeline updates + feed warm-up * Change files * Address PR feedback * Improvements to the warm up pipeline
1 parent 6b756fe commit eaf548c

7 files changed

Lines changed: 465 additions & 11 deletions

‎.ado/README.md‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ setup and the network-isolation workarounds.
1010

1111
| Pipeline | Entry file | ADO project | 1ES template | Notes |
1212
|----------|------------|-------------|--------------|-------|
13-
| CI | `ci-pipeline.yml` | `ISS` | `Office.Official` | signed Official build; `trigger`/`pr` are set in the ADO definition |
13+
| CI | `ci-pipeline.yml` | `ISS` | `Office.Official` | signed Official build; `trigger` branch filters and a weekly heartbeat `schedule` are defined in YAML |
1414
| PR | `pr-pipeline.yml` | public (`ms`) | `1ES.Unofficial` | validation build for GitHub PRs |
1515
| Release | `release-pipeline.yml` | `ISS` | `Office.Official` | triggered by CI completion; publishes packages and symbols |
16+
| Feed warm-up | `warm-feed-cache-pipeline.yml` | `ISS` | `Office.Unofficial` | scheduled; keeps `ms/react-native-public` populated for anonymous PR restores |
1617

1718
CI and PR share all build/test/pack logic through `build-template.yml`; the
1819
`buildEnvironment` parameter (`Continuous` vs `PullRequest`) gates the
@@ -69,6 +70,11 @@ otherwise hide:
6970
CDN mid-build. This is an interim step; the durable fix is to bake it into the
7071
agent image.
7172

73+
Public PR builds read this feed **anonymously**, so they can only restore versions
74+
an authenticated identity has already saved. `warm-feed-cache-pipeline.yml` (script:
75+
`vnext/Scripts/Warm-RnwFeedCache.ps1`) runs on a schedule to pre-populate the npm
76+
and NuGet dependency closures and keep those anonymous restores working.
77+
7278
## SDL and Component Governance
7379

7480
The Office template runs SDL (CredScan, BinSkim, CodeQL, Component Governance,
@@ -86,6 +92,11 @@ root `package.json`), so nothing is suppressed.
8692
- NuGet → nuget.org (API key from `OGX-JSHost-KV`)
8793
- PDB symbols → Microsoft Symbol Server (`templates/publish-symbols.yml`)
8894

89-
Two Release items are intentionally deferred to a follow-up change: the private-feed
90-
NuGet service connection (a placeholder `endpointId` remains in
91-
`release-pipeline.yml`) and a more authoritative publish-eligibility check.
95+
The nuget.org publish runs 1ES Network Isolation in report-only mode
96+
(`settings.networkIsolationMode: Audit`): `Enforce` blocks `api.nuget.org`, and the
97+
per-domain allow-list is not plumbed for release jobs, so mode is the only
98+
in-pipeline lever. Returning to `Enforce` requires adding nuget.org to the
99+
`CFSClean` isolation policy for this pipeline (follow-up).
100+
101+
One item remains deferred: a more authoritative npm publish-eligibility check (the
102+
current check reads the feed anonymously and sees only cached versions).

‎.ado/ci-pipeline.yml‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,29 @@
55

66
name: 0.0.$(Date:yyMM.d)$(Rev:rrr)
77

8-
trigger: none
8+
trigger:
9+
branches:
10+
include:
11+
- main
12+
- '0.81-stable'
13+
- '0.82-stable'
14+
- '0.83-stable'
15+
- '0.84-stable'
16+
- '0.85-stable'
17+
- '0.86-stable'
18+
- '0.87-stable'
919
pr: none
1020

21+
schedules:
22+
# Weekly heartbeat: keeps the pipeline from being auto-disabled after long
23+
# inactivity. 10:00 UTC ~= 02:00 Pacific (cron is UTC-only: 02:00 PST / 03:00 PDT).
24+
- cron: '0 10 * * Mon'
25+
displayName: Weekly heartbeat (Mondays ~02:00 Pacific)
26+
branches:
27+
include:
28+
- main
29+
always: true
30+
1131
parameters:
1232
- name: isReleaseBuild
1333
displayName: 'Treat as Release build (skip beachball, use committed versions)'

‎.ado/release-pipeline.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ resources:
3838
branches:
3939
include:
4040
- main
41-
- '0.74-stable'
4241
- '0.81-stable'
4342
- '0.82-stable'
4443
- '0.83-stable'
4544
- '0.84-stable'
4645
- '0.85-stable'
46+
- '0.86-stable'
47+
- '0.87-stable'
4748
repositories:
4849
- repository: OfficePipelineTemplates
4950
type: git
@@ -65,6 +66,9 @@ extends:
6566
enableExclusions: true
6667
suppression:
6768
suppressionFile: $(Build.SourcesDirectory)\.ado\guardian\sdl\.gdnsuppress
69+
settings:
70+
# Report-only network isolation so nuget.org publishing can egress (Enforce blocks it).
71+
networkIsolationMode: Audit
6872
stages:
6973
#
7074
# Gate stage — runs unconditionally for every trigger.
@@ -239,10 +243,7 @@ extends:
239243
steps:
240244
- template: .ado/templates/publish-nuget-to-ado-feed.yml@self
241245
parameters:
242-
# TODO(ISS): create an external NuGet service connection in the ISS
243-
# project for the ms/react-native feed, then set endpointId to that
244-
# connection's endpoint GUID and publishFeedCredentials to its name.
245-
endpointId: '00000000-0000-0000-0000-000000000000'
246+
endpointId: 'cfe2ce40-0448-46a1-b36d-4205330ca275'
246247
nugetFeedUrl: 'https://pkgs.dev.azure.com/ms/_packaging/react-native/nuget/v3/index.json'
247248
packageParentPath: '$(Pipeline.Workspace)/ReactWindows-final-nuget'
248249
packagesToPush: '$(Pipeline.Workspace)/ReactWindows-final-nuget/*.nupkg'

‎.ado/templates/publish-nuget-to-ado-feed.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
- name: azureSubscription
33
type: string
4-
default: 'Office-React-Native-Windows-Bot'
4+
default: 'Office-Hermes-Windows-Bot'
55
- name: endpointId
66
type: string
77
- name: nugetFeedUrl

‎.ado/warm-feed-cache-pipeline.yml‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#
2+
# Scheduled feed-warming pipeline (office/ISS, non-production).
3+
#
4+
# Runs Warm-RnwFeedCache.ps1 to save the CLI-init toolchain closure into the
5+
# ms/react-native-public feed with an authenticated identity, so anonymous PR
6+
# builds restore cleanly instead of 404ing on a not-yet-cached transitive package.
7+
#
8+
# Runs every 6 hours; drop to hourly later if it stays light.
9+
#
10+
11+
name: 0.0.$(Date:yyMM.d)$(Rev:rrr)
12+
13+
trigger: none
14+
pr: none
15+
16+
schedules:
17+
- cron: "0 0,6,12,18 * * *"
18+
displayName: Every 6 hours
19+
branches:
20+
include:
21+
- main
22+
always: true
23+
24+
resources:
25+
repositories:
26+
- repository: OfficePipelineTemplates
27+
type: git
28+
name: 1ESPipelineTemplates/OfficePipelineTemplates
29+
ref: refs/tags/release
30+
31+
extends:
32+
template: v1/Office.Unofficial.PipelineTemplate.yml@OfficePipelineTemplates
33+
parameters:
34+
pool:
35+
name: fabric-internal-pool-large
36+
demands: ImageOverride -equals rnw-img-vs2026-node24
37+
sdl:
38+
bandit:
39+
enabled: false
40+
eslint:
41+
enableExclusions: true
42+
suppression:
43+
suppressionFile: $(Build.SourcesDirectory)\.ado\guardian\sdl\.gdnsuppress
44+
stages:
45+
- stage: Warm
46+
displayName: Warm feed cache
47+
jobs:
48+
- job: WarmFeed
49+
displayName: Warm npm and NuGet feed cache
50+
timeoutInMinutes: 60
51+
steps:
52+
- checkout: self
53+
fetchDepth: 1
54+
55+
- task: UseNode@1
56+
displayName: Use Node.js 24.x
57+
inputs:
58+
version: '24.x'
59+
60+
# The agent image does not guarantee Yarn (build-template.yml installs it
61+
# explicitly), and the warm script runs `yarn install`. Authenticate npm to
62+
# the feed, then install the same pinned Yarn from it.
63+
- template: .ado/templates/auth-npm-feed.yml@self
64+
65+
- task: CmdLine@2
66+
displayName: Install pinned Yarn from the feed
67+
inputs:
68+
script: npm install --global yarn@1.22.22 --registry https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/npm/registry/
69+
70+
# Interim identity (shared with auth-npm-feed.yml); swap to the RNW managed
71+
# identity once it is provisioned. AzureCLI@2 logs in az as this identity, so
72+
# the script's `az account get-access-token` authenticates to the feed.
73+
- task: AzureCLI@2
74+
displayName: Warm ms/react-native-public feed
75+
inputs:
76+
azureSubscription: Office-Hermes-Windows-Bot
77+
scriptType: pscore
78+
scriptLocation: inlineScript
79+
inlineScript: |
80+
$ErrorActionPreference = 'Stop'
81+
& "$(Build.SourcesDirectory)/vnext/Scripts/Warm-RnwFeedCache.ps1"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Release/CI pipeline updates + feed warm-up",
4+
"packageName": "react-native-windows",
5+
"email": "vmorozov@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

0 commit comments

Comments
 (0)