Skip to content

PostPublishNotification command should not depend on the displayName of individual stages #1698

@lbussell

Description

@lbussell

This is needed before Add a common prefix to all pipeline stages that aren't injected by 1ES pipeline templates (#1696) can be implemented.

The PostPublishNotification command depends on the displayName of individual stages:

--task "Copy Images (Authenticated)"
--task "Publish Manifest (Authenticated)"
--task "Wait for Image Ingestion (Authenticated)"
--task "Publish Readmes"
--task "Wait for MCR Doc Ingestion (Authenticated)"
--task "Publish Image Info"
--task "Ingest Kusto Image Info (Authenticated)"
--task "Generate EOL Annotation Data (Authenticated)"
--task "Annotate EOL Images (Authenticated)"
--task "Wait for Annotation Ingestion (Authenticated)"

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:

Timeline timeline = await buildClient.GetBuildTimelineAsync(project.Id, Options.BuildId);

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:

    {
      "previousAttempts": [],
      "id": "<guid>",
      "parentId": "<another guid>",
      "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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions