pipeline file changes

This commit is contained in:
Brett Hewitson 2022-12-29 17:03:47 +10:00
parent 9a97d15e84
commit 77d1d14f5e

View file

@ -30,13 +30,13 @@ steps:
[Net.ServicePointManager]::SecurityProtocol = "Tls12, Tls13"
# Get an overview of the build definition
$definitionUrl = "$CollectionUri/$repositoryName/_apis/build/Definitions/$($definitionId)?api-version=5.0"
$definitionUrl = "$CollectionUri/$ProjectName/_apis/build/Definitions/$($DefinitionId)?api-version=5.0"
$definitionResponse = Invoke-RestMethod -Method Get -Uri $definitionUrl -Headers $headers -UseBasicParsing
# If the build has the variable, update it.
if ($definitionResponse.variables.$VariableName) {
$oldValue = $definitionResponse.variables.$variableName.value
$definitionResponse.variables.$variableName.value = $VariableValue
$oldValue = $definitionResponse.variables.$VariableName.value
$definitionResponse.variables.$VariableName.value = $VariableValue
Write-Output -InputObject "Updating $VariableName from $($oldValue) to $($VariableValue)..."