diff --git a/NuGet.Config.AzureArtifacts b/NuGet.Config.AzureArtifacts new file mode 100644 index 00000000..897b3900 --- /dev/null +++ b/NuGet.Config.AzureArtifacts @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/NuGet.Config b/NuGet.Config.Public similarity index 93% rename from NuGet.Config rename to NuGet.Config.Public index c5e21601..d8f90e26 100644 --- a/NuGet.Config +++ b/NuGet.Config.Public @@ -1,7 +1,7 @@  - + \ No newline at end of file diff --git a/Pipelines/core-pipeline.yml b/Pipelines/core-pipeline.yml index a2d3c66b..3dfd17b8 100644 --- a/Pipelines/core-pipeline.yml +++ b/Pipelines/core-pipeline.yml @@ -105,8 +105,8 @@ stages: inputs: packageType: 'sdk' version: '${{ variables.CurrentSDK }}' - - script: 'dotnet tool update -g nbgv' - displayName: 'Install GitVersioning' + - script: 'dotnet tool update -g nbgv --configfile NuGet.Config.Public' + displayName: 'Update GitVersioning' - task: PowerShell@2 displayName: Set Release Version inputs: diff --git a/Pipelines/templates/dotnet-publish-linux-mac-job.yml b/Pipelines/templates/dotnet-publish-linux-mac-job.yml index 8c6db484..1f1b4010 100644 --- a/Pipelines/templates/dotnet-publish-linux-mac-job.yml +++ b/Pipelines/templates/dotnet-publish-linux-mac-job.yml @@ -46,6 +46,7 @@ jobs: pool: vmImage: 'ubuntu-latest' steps: + - task: NuGetAuthenticate@1 - task: UseDotNet@2 displayName: Install Dotnet SDK inputs: @@ -60,6 +61,8 @@ jobs: displayName: Restore inputs: command: 'restore' + feedsToUse: config + nugetConfigPath: NuGet.Config.AzureArtifacts projects: ${{ parameters.projectPath }} verbosityRestore: 'Normal' - task: DotNetCoreCLI@2 diff --git a/Pipelines/templates/dotnet-publish-win-netcore-job.yml b/Pipelines/templates/dotnet-publish-win-netcore-job.yml index 621717cf..f02d939a 100644 --- a/Pipelines/templates/dotnet-publish-win-netcore-job.yml +++ b/Pipelines/templates/dotnet-publish-win-netcore-job.yml @@ -46,6 +46,7 @@ jobs: pool: vmImage: 'windows-latest' steps: + - task: NuGetAuthenticate@1 - task: UseDotNet@2 displayName: Install Dotnet SDK inputs: @@ -60,6 +61,8 @@ jobs: displayName: Restore inputs: command: 'restore' + feedsToUse: config + nugetConfigPath: NuGet.Config.AzureArtifacts projects: ${{ parameters.projectPath }} verbosityRestore: 'Normal' - task: DotNetCoreCLI@2 diff --git a/Pipelines/templates/dotnet-test-job.yml b/Pipelines/templates/dotnet-test-job.yml index 75e37d63..8162539c 100644 --- a/Pipelines/templates/dotnet-test-job.yml +++ b/Pipelines/templates/dotnet-test-job.yml @@ -26,6 +26,7 @@ jobs: pool: vmImage: 'windows-latest' steps: + - task: NuGetAuthenticate@1 - task: UseDotNet@2 displayName: Install Dotnet SDK inputs: @@ -36,8 +37,16 @@ jobs: inputs: packageType: 'sdk' version: ${{ parameters.dotnetVersionLTS }} + - task: DotNetCoreCLI@2 + displayName: Dotnet Restore + inputs: + command: 'restore' + feedsToUse: config + nugetConfigPath: NuGet.Config.AzureArtifacts + projects: ${{ parameters.projectPath }} + verbosityRestore: 'Normal' - task: DotNetCoreCLI@2 displayName: Dotnet Test inputs: command: 'test' - projects: ${{ parameters.projectPath }} \ No newline at end of file + projects: ${{ parameters.projectPath }} diff --git a/Pipelines/templates/nbgv-set-version-steps.yml b/Pipelines/templates/nbgv-set-version-steps.yml index ca3a54eb..9716910e 100644 --- a/Pipelines/templates/nbgv-set-version-steps.yml +++ b/Pipelines/templates/nbgv-set-version-steps.yml @@ -1,6 +1,6 @@ steps: -- script: 'dotnet tool update -g nbgv' - displayName: 'Install GitVersioning' +- script: 'dotnet tool update -g nbgv --configfile NuGet.Config.Public' + displayName: 'Update GitVersioning' - task: PowerShell@2 displayName: Set Release Version inputs: diff --git a/Pipelines/templates/nuget-build-job.yml b/Pipelines/templates/nuget-build-job.yml index 03ce15b5..27c60c6c 100644 --- a/Pipelines/templates/nuget-build-job.yml +++ b/Pipelines/templates/nuget-build-job.yml @@ -42,6 +42,7 @@ jobs: vmImage: 'windows-latest' steps: - task: CodeQL3000Init@0 + - task: NuGetAuthenticate@1 - task: UseDotNet@2 displayName: Install Dotnet SDK inputs: @@ -55,6 +56,8 @@ jobs: displayName: Dotnet Restore inputs: command: 'restore' + feedsToUse: config + nugetConfigPath: NuGet.Config.AzureArtifacts projects: ${{ parameters.projectPath }} verbosityRestore: 'Normal' - task: DotNetCoreCLI@2