From 5f6e13bb4c3c87456395a1c8581d2b37ccc21599 Mon Sep 17 00:00:00 2001 From: Fabio Cavalcante Date: Fri, 31 Jul 2026 10:11:57 -0700 Subject: [PATCH] Route dependency restores through CFS Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeQL.yml | 4 ++-- .nuget/NuGet.Config | 10 ---------- NuGet.config | 19 +++++++++++++++++++ eng/templates/.npmrc | 11 +++++++++++ eng/templates/build-steps.yml | 4 ++++ eng/templates/build.yml | 2 ++ eng/templates/test.yml | 7 +++++++ 7 files changed, 45 insertions(+), 12 deletions(-) delete mode 100644 .nuget/NuGet.Config create mode 100644 NuGet.config create mode 100644 eng/templates/.npmrc diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index dae391413..7245dd97e 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -72,10 +72,10 @@ jobs: dotnet-version: '8.0.x' - name: Restore dependencies - run: dotnet restore $solution + run: dotnet restore "$env:solution" - name: Build - run: dotnet build $solution #--configuration $config #--no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true + run: dotnet build "$env:solution" #--configuration $config #--no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true # Run CodeQL analysis - name: Perform CodeQL Analysis diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config deleted file mode 100644 index 98ec1b22d..000000000 --- a/.nuget/NuGet.Config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 000000000..d552b9505 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/templates/.npmrc b/eng/templates/.npmrc new file mode 100644 index 000000000..98636b736 --- /dev/null +++ b/eng/templates/.npmrc @@ -0,0 +1,11 @@ +registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@azure:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@azure-rest:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@colors:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@dabh:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@js-joda:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@microsoft:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@opentelemetry:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@so-ric:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@types:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@typespec:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ diff --git a/eng/templates/build-steps.yml b/eng/templates/build-steps.yml index cdfaea8fe..294b8ced3 100644 --- a/eng/templates/build-steps.yml +++ b/eng/templates/build-steps.yml @@ -21,6 +21,8 @@ steps: displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: | src/DurableTask.AzureStorage/DurableTask.AzureStorage.sln @@ -60,6 +62,8 @@ steps: displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: | .\Test\DurableTask.Core.Tests\DurableTask.Core.Tests.csproj diff --git a/eng/templates/build.yml b/eng/templates/build.yml index ef2e02820..a6b0993fd 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -18,6 +18,8 @@ jobs: displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: | src/DurableTask.AzureStorage/DurableTask.AzureStorage.sln diff --git a/eng/templates/test.yml b/eng/templates/test.yml index f4fc29a7f..fa366c110 100644 --- a/eng/templates/test.yml +++ b/eng/templates/test.yml @@ -18,6 +18,11 @@ steps: find "$(System.DefaultWorkingDirectory)/tests" -name '*Test*.dll' displayName: 'List Test DLLs' + - task: npmAuthenticate@0 + displayName: 'Authenticate npm' + inputs: + workingFile: '$(Build.SourcesDirectory)/eng/templates/.npmrc' + # Install Azurite - bash: | echo "Installing azurite" @@ -28,6 +33,8 @@ steps: echo "azurite started" sleep 5 displayName: 'Install and Run Azurite' + env: + NPM_CONFIG_USERCONFIG: '$(Build.SourcesDirectory)/eng/templates/.npmrc' # Run tests - task: VSTest@2