I would like to fetch the build timeline and feed it to a REST API for logging purposes, from within the pipeline itself.
Until now, I've tried creating a step with a powershell that invokes _apis/build/builds/$Env:BUILD_BUILDID/timeline
, but I am halted at an error
Invoke-RestMethod : The underlying connection was closed
Do you know if there's a way to achieve that?
For me, adding [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
solved, which is strange to me since this is an hosted pipeline, ran within a Linux vm.