Azure DevOps Pipeline build number warning

Azure DevOps Pipeline build number warning

Hi All,

I’ve had a warning in my Azure DevOps Pipeline, that deploys this Blog via Hugo to Azure Static Website.

The build number format string Azure Static Web Apps CI/CD generated a build number Azure Static Web Apps CI/CD which contains invalid character(s), is too long, or ends with ‘.’. The maximum length of a build number is 255 characters. Characters which are not allowed include ‘"’, ‘/’, ‘:’, ‘<’, ‘>’, ‘', ‘|’, ‘?’, ‘@’, and ‘*’.

The Pipeline was created automatically when i created the Azure Static Website.

The reason here seems to be that the “name” contains a slash.

name: Azure Static Web Apps CI/CD

I’ve been reading the documentation about Configure run or build numbers

I’ve changed the Name and added a new Script under steps

name: $(TeamProject)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
- script: echo '$(Build.BuildNumber)' # outputs customized build number

No more warning at build time

And the Script that shows the Build Number also works fine

Regards
Andres Bohren

vscode Logo