0

enter image description hereUsing a PowerShell task running as part of this Agent Job, I want to get the URL to link back to the logs (of the same Agent Job). The URL is consistent but I can't find Predefined variables for releaseID or environmentID which are the missing pieces of the puzzle for the URL. Does anyone know how to get these IDs or another way of programatically retrieving this URL from a task within the Agent Job?

Guy Wood
  • 255
  • 4
  • 15

1 Answers1

1

The URL is consistent but I can't find Predefined variables for releaseID or environmentID which are the missing pieces of the puzzle for the URL.

We could check this doc Default variables - Release to get the release predefined variable.

We could also add task Bash and enter the script printenv to print the variable, then we could see that the releaseID is RELEASE_RELEASEID or Release.ReleaseId and environmentID is RELEASE_ENVIRONMENTID or Release.EnvironmentId, we could print them via $(Release.ReleaseId) and $(Release.EnvironmentId)

Result:

enter image description here

Vito Liu
  • 7,525
  • 1
  • 8
  • 17
  • Ah thank you! I wasn't looking at "classic" predefined variables page so couldn't find these. Will test shortly and report back :-) – Guy Wood Apr 15 '21 at 08:06