Complete the code to define a pipeline trigger on the main branch.
trigger:
branches:
include:
- [1]The trigger specifies which branch starts the pipeline automatically. 'main' is the default main branch.
Complete the code to specify the agent pool for the pipeline job.
pool: vmImage: '[1]'
'ubuntu-latest' is a common choice for running Linux-based builds on the latest supported Ubuntu image.
Fix the error in the step to run a script in the pipeline.
- script: echo Hello, Azure Pipelines! displayName: '[1]'
The displayName should be a readable string with spaces, like 'Run Script'.
Fill both blanks to define a job with a name and a step that runs a script.
jobs: - job: [1] steps: - script: echo Build started displayName: '[2]'
The job name is 'BuildJob' and the step displayName is 'Start Script' to describe the action.
Fill all three blanks to define a pipeline with trigger, pool, and a script step.
trigger:
branches:
include:
- [1]
pool:
vmImage: '[2]'
steps:
- script: echo Build running
displayName: '[3]'The pipeline triggers on 'main', uses 'ubuntu-latest' vmImage, and the step is named 'Run Build'.