Posted in

Azure Devops Custom (Errors) Messages in emails and Job reports

One of the common feature request for Azure Devops is to have a custom messages in emails. It could be great feature, but currently we have some options – so let’s see them one by one.

The code:

– task: Bash@3
  inputs:
    targetType: ‘inline’
    script: |
      echo “##vso[task.logissue type=error]Hello world!”
      echo “##vso[task.complete result=Failed]”

produces the following report (we see the message), and email (we see the message):

The code:

– task: Bash@3
  inputs:
    targetType: ‘inline’
    script: |
      echo “##vso[task.logissue type=warning]Hello world!”
      echo “##vso[task.complete result=Succeeded]”

produces the following report (we see the message), and email (we do not see the message):

The code:

– task: Bash@3
  inputs:
    targetType: ‘inline’
    script: |
      echo “##vso[task.logissue type=error]01Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.logissue type=error]02Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.logissue type=error]03Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.logissue type=error]04Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.logissue type=error]05Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.logissue type=error]06Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.logissue type=error]07Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”
      echo “##vso[task.complete result=Succeeded]”

produces the following report (we see the message), and email (we see the message):

Microsoft Certified Trainer, Office 365, AWS, Azure and Cloud Expert-Architect. In the IT world for over than 20 years.

Apart from the main area of Microsoft Azure expert in the field of infrastructure servers Windows Server 2003-2019, Microsoft Active Directory, Hyper-V Private Cloud, IIS, System Center, SQL.

Private Cloud, System Center, Hyper-V, Open Stack Expert and all Microsoft products Expert. Linux Server administrator.

My Azure community projects:

https://mazeball.azurewebsites.net/
https://github.com/MariuszFerdyn?tab=repositories

More