Skip to content

Commit 43d68d8

Browse files
Skip NuGet restores in PR Tools and authenticate publishing (#12297)
NuGet dependency updates can break PR previews when the Azure Artifacts feed has not yet saved the requested versions from upstream, as seen in #12296. PR Tools only publishes the playground, website, and VS Code extension, so it does not need to restore or build the .NET-based Visual Studio extension. Skip that work in PR Tools and correct the .NET opt-in parameter so its `false` default actually disables setup and restore. Publishing retains its restores and now runs `NuGetAuthenticate@1` first; the E2E job explicitly preserves its existing .NET setup.
1 parent 5e3d328 commit 43d68d8

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎eng/tsp-core/pipelines/jobs/e2e.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- template: /eng/tsp-core/pipelines/templates/install.yml
2222
parameters:
2323
nodeVersion: 26.x
24+
useDotNet: true
2425
- template: /eng/tsp-core/pipelines/templates/install-browsers.yml
2526
- template: /eng/tsp-core/pipelines/templates/setup-linux-ui.yml
2627
- template: /eng/tsp-core/pipelines/templates/build.yml

‎eng/tsp-core/pipelines/pr-tools.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ extends:
2828
displayName: Setup Try It
2929
variables:
3030
TYPESPEC_WEBSITE_BASE_PATH: "/prs/$(System.PullRequest.PullRequestNumber)/"
31+
TYPESPEC_SKIP_VS_BUILD: true
3132
steps:
3233
- checkout: self
3334
persistCredentials: true

‎eng/tsp-core/pipelines/templates/install.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
default: 24.16.0
66

77
- name: useDotNet
8-
type: string
8+
type: boolean
99
default: false
1010

1111
- name: pnpmStorePath
@@ -37,6 +37,9 @@ steps:
3737
retryCountOnTaskFailure: 3
3838

3939
- ${{ if parameters.useDotNet }}:
40+
- task: NuGetAuthenticate@1
41+
displayName: Authenticate NuGet feed
42+
4043
- script: dotnet restore --configfile "$(Build.SourcesDirectory)/eng/nuget.config"
4144
displayName: Restore .NET Dependencies
4245
workingDirectory: packages/typespec-vs

0 commit comments

Comments
 (0)