Skip to content

Commit 438e639

Browse files
gavinbarronCopilot
andauthored
Route NuGet restore through the CFS central package feed (#1139)
Routes CI package restore through the authenticated GraphDeveloperExperiences_Public Azure Artifacts feed (network isolation / CFS compliance). Requires a pipeline run to validate against the feed. Copilot-Session: 9bd6fe40-0d69-4e3f-927b-8628c0ab6d34 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9d99d96 commit 438e639

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

pipelines/ci-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,27 @@ extends:
6161
inputs:
6262
packageType: sdk
6363
version: 6.x
64+
- task: NuGetAuthenticate@1
65+
displayName: 'Authenticate to Azure Artifacts'
66+
67+
- pwsh: |
68+
@"
69+
<?xml version="1.0" encoding="utf-8"?>
70+
<configuration>
71+
<packageSources>
72+
<clear />
73+
<add key="GraphDeveloperExperiences_Public" value="https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/nuget/v3/index.json" />
74+
</packageSources>
75+
</configuration>
76+
"@ | Set-Content -Path "$(Build.SourcesDirectory)/nuget.config" -Encoding UTF8
77+
displayName: 'Create nuget.config (central feed)'
6478
- task: DotNetCoreCLI@2
6579
displayName: 'dotnet restore'
6680
inputs:
6781
command: restore
6882
projects: '**/*.csproj'
83+
feedsToUse: "config"
84+
nugetConfigPath: "$(Build.SourcesDirectory)/nuget.config"
6985
- task: PowerShell@2
7086
displayName: 'Validate updated version'
7187
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())

0 commit comments

Comments
 (0)