Open rasmusskov opened 2 years ago
@rasmusskov did you ever try? Did it work?
@Gudui Didnt really get an aswer in here, so kept investigating.
I am using the devops api for this... Sample code something like below
if ($null -eq $ENV:SYSTEM_ACCESSTOKEN)
{
Write-Error "No access token provided. Enable 'Allow scripts to access the OAuth token' in Deployment Group Job"
}
$URL = "$($ENV:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$($ENV:SYSTEM_TEAMPROJECTID)/_apis/distributedtask/variablegroups"
$variablegroups = Invoke-RestMethod -Uri $url -Headers @{
Authorization = "Bearer $ENV:SYSTEM_ACCESSTOKEN" # Provided by ADO thanks to OAuth checkbox
}
I have defined some Variable Groups in my devops project, and is updating the values in there when pre-deploying my repository. When doing the actual release, i would like to compose an email, where the body contains some of the values of the variables.
Something like
Release completed for the sandbox. Releaseno is $LibraryName$VariableName
Is this possible, and can someone help with the syntax?