Skip to content

Commit 7924bb6

Browse files
authored
Move nuget push to use windows image (Azure#50386)
Currently ubuntu 24.04 no longer has mono installed and so the NugetCommand push no longer works. Using the DonetCoreCLR task to push doesn't work either with because it fails with "Error: DotNetCore currently does not support using an encrypted Api Key." (see microsoft/azure-pipelines-tasks#7160 for details). After looking around we are switching our publishing to run on windows as that will always have .NET installed and doesn't rely on mono at all.
1 parent d049de7 commit 7924bb6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

eng/pipelines/templates/stages/archetype-net-release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ stages:
105105

106106
pool:
107107
name: azsdk-pool
108-
image: ubuntu-24.04
109-
os: linux
108+
image: windows-2022 # Nuget publish requires .NET framework on windows to handle the auth
109+
os: windows
110110

111111
templateContext:
112112
type: releaseJob # Required, this indicates this deployment job is a release job
@@ -123,7 +123,6 @@ stages:
123123
- task: 1ES.PublishNuget@1
124124
displayName: Publish ${{artifact.name}} package to NuGet.org
125125
inputs:
126-
useDotNetTask: true
127126
packageParentPath: '$(Pipeline.Workspace)'
128127
packagesToPush: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.nupkg;!$(Pipeline.Workspace)//${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.symbols.nupkg'
129128
nuGetFeedType: external
@@ -132,7 +131,6 @@ stages:
132131
- task: 1ES.PublishNuget@1
133132
displayName: Publish to DevOps Feed
134133
inputs:
135-
useDotNetTask: true
136134
packageParentPath: '$(Pipeline.Workspace)'
137135
packagesToPush: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.nupkg;!$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.symbols.nupkg'
138136
publishVstsFeed: ${{ parameters.DevOpsFeedID }}
@@ -290,8 +288,8 @@ stages:
290288

291289
pool:
292290
name: azsdk-pool
293-
image: ubuntu-24.04
294-
os: linux
291+
image: windows-2022 # Nuget publish requires .NET framework on windows to handle the auth
292+
os: windows
295293

296294
templateContext:
297295
type: releaseJob
@@ -320,7 +318,6 @@ stages:
320318
- task: 1ES.PublishNuget@1
321319
displayName: 'Publish to DevOps Feed'
322320
inputs:
323-
useDotNetTask: true
324321
packageParentPath: '$(Pipeline.Workspace)'
325322
packagesToPush: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.nupkg;!$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.symbols.nupkg'
326323
publishVstsFeed: $(DevOpsFeedID)

0 commit comments

Comments
 (0)