Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 736
Stef Heyenrath Avatar asked Jan 26 '26 07:01

Stef Heyenrath


1 Answers

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

like image 182
Andy Li-MSFT Avatar answered Jan 28 '26 07:01

Andy Li-MSFT