diff --git a/.azure/pipelines/update-pipeline-variable.yml b/.azure/pipelines/update-pipeline-variable.yml index 597ca0c8..aba3394e 100644 --- a/.azure/pipelines/update-pipeline-variable.yml +++ b/.azure/pipelines/update-pipeline-variable.yml @@ -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)..."