How do I send a task log within a release from an azure devops deployment pipeline to a Microsoft teams channel?

A MS teams channel has been configured to notify us after the last stage (prod deployment) in an azure devops pipeline has completed. However, there is a need to include SQL execution statistics like rows affected, duration etc. which I'm capturing in the logs in the release pipeline. Is there way to extract that single task log within a stage in the pipeline and post it to the teams channel?

Currently I'm offering stakeholders the ability to click on the link that takes them to the release within ADO and view the log that way. But I would like to just offer the log on the teams channel and save people time and confusion. I'm including a couple links as reference as to what I have been looking at, the official MS documentation and another is a stack overflow thread with a similar question, but for slack.

If it is done with this api, how would I capture the taskId? I'm not fully understanding how to do this:

GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs?api-version=5.0-preview.2


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation