From 972ea15c1a55779feb4026f573126f53aa2b7e81 Mon Sep 17 00:00:00 2001 From: George <1641829+finsharp@users.noreply.github.com> Date: Wed, 23 Sep 2020 15:43:09 +0300 Subject: [PATCH 1/3] Update install-tools-template.yml --- .azure-pipelines/install-tools-template.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/install-tools-template.yml b/.azure-pipelines/install-tools-template.yml index 44ad5a38a3d..9c2a9b9dd0e 100644 --- a/.azure-pipelines/install-tools-template.yml +++ b/.azure-pipelines/install-tools-template.yml @@ -57,6 +57,7 @@ steps: inputs: targetType: inline pwsh: true + errorActionPreference: 'continue' script: | $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Continue Get-PSRepository @@ -68,4 +69,4 @@ steps: Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' Get-PSRepository Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Credential $credsAzureDevopsServices -AllVersions -Repository 'LocalNugetFeed' - Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed' \ No newline at end of file + Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed' From 2112ca172ce8b2ce6cf30ac378729be80f1a3f44 Mon Sep 17 00:00:00 2001 From: George <1641829+finsharp@users.noreply.github.com> Date: Wed, 23 Sep 2020 15:54:00 +0300 Subject: [PATCH 2/3] UnRegister Source before Registering --- .azure-pipelines/install-tools-template.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/install-tools-template.yml b/.azure-pipelines/install-tools-template.yml index 9c2a9b9dd0e..9a750111092 100644 --- a/.azure-pipelines/install-tools-template.yml +++ b/.azure-pipelines/install-tools-template.yml @@ -65,8 +65,10 @@ steps: $nugetFeed = '$(NUGETFEED)' $user = '$(NUGETBUILDUSER)' $credsAzureDevopsServices = New-Object System.Management.Automation.PSCredential($user, $patToken) - Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget' - Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' + UnRegister-PackageSource -Name 'LocalNugetPackageSource' -ErrorAction Continue + UnRegister-PSRepository -Name 'LocalNugetFeed' -ErrorAction Continue + Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget' -Force -ErrorAction Continue + Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' -Force -ErrorAction Continue Get-PSRepository Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Credential $credsAzureDevopsServices -AllVersions -Repository 'LocalNugetFeed' Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed' From 01e058665b84426555b52ebb2a74154913cb5acf Mon Sep 17 00:00:00 2001 From: George <1641829+finsharp@users.noreply.github.com> Date: Wed, 23 Sep 2020 16:05:04 +0300 Subject: [PATCH 3/3] Package sources --- .azure-pipelines/install-tools-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/install-tools-template.yml b/.azure-pipelines/install-tools-template.yml index 9a750111092..cb8bade86c0 100644 --- a/.azure-pipelines/install-tools-template.yml +++ b/.azure-pipelines/install-tools-template.yml @@ -67,8 +67,8 @@ steps: $credsAzureDevopsServices = New-Object System.Management.Automation.PSCredential($user, $patToken) UnRegister-PackageSource -Name 'LocalNugetPackageSource' -ErrorAction Continue UnRegister-PSRepository -Name 'LocalNugetFeed' -ErrorAction Continue - Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget' -Force -ErrorAction Continue - Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' -Force -ErrorAction Continue + Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget' -ErrorAction Continue + Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' -ErrorAction Continue Get-PSRepository Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Credential $credsAzureDevopsServices -AllVersions -Repository 'LocalNugetFeed' Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed'