Stage * has an invalid name - Azure Pipelines

Viewed 151

Here is my debug Azure Pipeline. When I run it I got error about invalid Stage and Job name Unit Test.

trigger:
  - main
pool:
  vmImage: ubuntu-latest
stages:
  - stage: Unit Test
    displayName: Unit Test
    jobs:  
      - job: Unit Test
        displayName: Unit Test
        steps:
          - checkout: self
            submodules: true
          - script: |
              pwd
              ls -l
            displayName: Debug
1 Answers

It was easy, space is not allowed for stage and job name. I had to rename Unit Test to UnitTest.

trigger:
  - main
pool:
  vmImage: ubuntu-latest
stages:
  - stage: UnitTest
    displayName: Unit Test
    jobs:  
      - job: UnitTest
        displayName: Unit Test
        steps:
          - checkout: self
            submodules: true
          - script: |
              pwd
              ls -l
            displayName: Debug
Related