fix(runners): build Azure Pipelines run link from the collection URI

Merged
MI
13d ago
+134-16

The Azure Pipelines runner now builds the run link from SYSTEM_TEAMFOUNDATIONCOLLECTIONURI and falls back to SYSTEM_TEAMFOUNDATIONSERVERURI. On Azure DevOps Server (self-hosted), the server URI has no collection segment, so the run link we recorded did not open the run. On Azure DevOps Services both variables have the same value, so links there do not change.

The runner now also:

  • returns an empty link when the base URI, the project, or the build ID is missing, instead of a broken relative URL
  • escapes the project name in the path
  • adds the job logs deep link (view=logs&j=...) only when SYSTEM_JOBID is set

The control plane records this link as the job and runner URL of the workflow run.

Fixes #3845

AI disclosure: this change was written with the help of Claude Code.

šŸ¤– Posted by Maximus bot (Claude Code) on behalf of @migmartri