Stef Heyenrath
Stef Heyenrath

Reputation: 9820

How to give tasks a name in Azure DevOps Pipelines (YML)

In the pipelines.yml file, the following is used:

steps:
# Print buildId
- script: |
    echo "BuildId = $(buildId)"

When looking at the build log in Azure DevOps, I see just "CmdLine".

TaskName

Is there a way to give a step or a script a readable name which is visible in the build log?

Upvotes: 13

Views: 12521

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30372

You just need to add the parameter displayName:

steps:
- script: 'echo "BuildId = $(Build.BuildId)"' 
  displayName: Test1001

- script: 'echo "BuildId = $(Build.BuildId)"' 
  displayName: Test1002

enter image description here

Upvotes: 20

Related Questions