diff --git a/azure-pipelines/templates/build-steps-template.yml b/azure-pipelines/templates/build-steps-template.yml index 3361ea76c..c51c93734 100644 --- a/azure-pipelines/templates/build-steps-template.yml +++ b/azure-pipelines/templates/build-steps-template.yml @@ -95,7 +95,7 @@ steps: continueOnError: true inputs: targetType: 'inline' - script: | + script: | dotnet new nugetconfig --force dotnet nuget add source ${{ parameters.igNuGetFeedUrl }} --name "IG ProGet NuGet" --allow-insecure-connections # Manually add the allowInsecureConnections attribute to the nuget.config file @@ -115,7 +115,7 @@ steps: $addUsername = $nugetConfig.CreateElement("add") Write-Host "adding username" - $userName = ${{ parameters.username }} + $userName = ConvertTo-SecureString "${{ parameters.username }}" -asPlainText -Force Write-Host "username is" Write-Host "$userName" $addUsername.SetAttribute("key", "Username") @@ -126,8 +126,9 @@ steps: $addPassword = $nugetConfig.CreateElement("add") Write-Host "adding password" + $password = ConvertTo-SecureString "${{ parameters.password}}" -asPlainText -Force $addPassword.SetAttribute("key", "ClearTextPassword") - $add.SetAttribute("value", "${{ parameters.password }}") + $add.SetAttribute("value", "$password") $source.AppendChild($addPassword) $packageSourceCredentials.AppendChild($source)