Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .azure-pipelines/install-tools-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ steps:
inputs:
targetType: inline
pwsh: true
errorActionPreference: 'continue'
script: |
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Continue
Get-PSRepository
$patToken = '$(NUGETFEEDKEY)' | ConvertTo-SecureString -AsPlainText -Force
$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' -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'
Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed'