dotnet / dotnet/docker-tools

PostPublishNotification command should not depend on the displayName of individual stages

Open
#1,698 0 comments 0 reactions 0 assignees View on GitHub
area-infrastructure
Dominant language
C#
Stars
181
Forks
67
Avg merge
2d 15h
Merged PRs (30d)
10

Description

This is needed before [Add a common prefix to all pipeline stages that aren't injected by 1ES pipeline templates (#1696)](https://github.com/dotnet/docker-tools/issues/1696) can be implemented.

The PostPublishNotification command depends on the `displayName` of individual stages:

https://github.com/dotnet/docker-tools/blob/f4c1d804fe90a050da4e087481687d00d829fa93/eng/common/templates/jobs/publish.yml#L199-L208

Instead, it should depend on the `name` of the stages which is independent of the `displayName`.

PostPublishNotification gets the build timeline from the Azure DevOps API:

https://github.com/dotnet/docker-tools/blob/41c28c39060023a762fc3ee2d2b8bd399274b4ed/src/Microsoft.DotNet.ImageBuilder/src/Commands/PostPublishNotificationCommand.cs#L151

Here is an example timeline (internal link): https://dev.azure.com/dnceng/internal/_apis/build/builds/2703129/timeline

An individual task might look like this:

```jsonc
{
"previousAttempts": [],
"id": "",
"parentId": "",
"type": "Task",
"name": "Publish Readmes", // this is the displayName
"refName": "PublishReadmes", // this is the name
"startTime": "2025-05-06T17:55:34.6033333Z",
"finishTime": "2025-05-06T17:55:39.9666667Z",
"currentOperation": null,
"percentComplete": null,
"state": "completed",
"result": "succeeded",
"resultCode": null,
// ...bunch of other properties
},
```

If we could get at the `refName` property, then we could use that instead of the `displayName`/`name`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.