0
votes

I have an azure-pipelines.yml controlling my build etc... works ok.

However I seem to be restricted, I can not use jobs: or stages: as documented in their allowable syntax for describing pipelines when editing the pipeline within the online editor.

Intellisence in online editor

In the above image no matter what or where I type, I do not get access to jobs, stages...

documentation: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema

how can I get access to these keywords as documented?

2
Can you reproduce your YAML file for us? You can share the online YAML editor link.Kadir Alan

2 Answers

1
votes

According to the syntax in the screenshot, steps is defined in your yaml. Remove the steps and the stages should be displayed normally. steps should be under job level and jobs need to be under the stage level.

enter image description here

Please refer to the Pipeline structure in this official document:

enter image description here

0
votes

Please refer to below structure to configure your azure-pipelines.yml.

pool:
  vmImage: windows-2019

stages:
- stage: Build
  jobs:
  - job: BuildJob
    steps:
    - script: echo Building!
- stage: Test
  jobs:
  - job: TestOnWindows
    steps:
    - script: echo Testing on Windows!
  - job: TestOnLinux
    steps:
    - script: echo Testing on Linux!
- stage: Deploy
  jobs:
  - job: Deploy
    steps:
    - script: echo Deploying the code!