Title.
Hi,
Thanks for reaching out. In most cases the deployment location is a combination of lots of variables generated at deployment time, and most times they even defer from target to target. So the general answer would be: Cannot be done, the only ways to get this info would be:
- Parsing the log file. Very painful.
- Looking at each machine’s
DeploymentJournal.xml
. Also not too optimal as you’ll need access to each machine.
Now, all that said, if you are not using a dynamic deployment location, and instead you are passing a fixed value declared through a project variable. Then you could get the release’s variable snapshot and get the value from there. To do this you’ll need to get the release through the API (i.e /api/releases/Releases-4870
) and then check the Links.ProjectVariableSnapshot
property of it as shown on the below gist.
Hope that helps,
Dalmiro
Thank you for your reply…
So what I have is a bunch of settings UNRELATED to deployment location and they are defined in root… any way that I can get deployment locations in this scenario ?
Thanks.
I’m not sure I’m understanding your last question. You want to get the values of those variables in that last screenshot using the API?
Yes.I do.I don’t know how. I will be grateful if you tell me how ? All the samples I saw were PROJECT variables none were about my structure.
Also, I was wondering if this structure help me to get deployment location any easier way that you can recommend ?
Thank you.
This script should help you get started: https://gist.github.com/Dalmirog/e5ec54fefddbddce13e524838e6d6358
It’ll return something like this for every variable
Id : 03f923e8-be7d-9e16-3889-3dc39d8141cf
Name : DatabaseServer
Value : PSQL01
Scope : @{Environment=System.Object[]}
IsEditable : True
Prompt :
Type : String
IsSensitive : False