0
0
Azurecloud~10 mins

Azure Pipelines overview - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a pipeline trigger on the main branch.

Azure
trigger:
  branches:
    include:
      - [1]
Drag options to blanks, or click blank then click option'
Amain
Bfeature
Cdevelop
Drelease
Attempts:
3 left
💡 Hint
Common Mistakes
Using a branch name that does not exist in the repository.
Forgetting to indent the YAML correctly.
2fill in blank
medium

Complete the code to specify the agent pool for the pipeline job.

Azure
pool:
  vmImage: '[1]'
Drag options to blanks, or click blank then click option'
Aubuntu-18.04
Bubuntu-latest
Cwindows-2016
Dmacos-latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using an outdated or unsupported vmImage name.
Choosing a Windows image when the build requires Linux.
3fill in blank
hard

Fix the error in the step to run a script in the pipeline.

Azure
- script: echo Hello, Azure Pipelines!
  displayName: '[1]'
Drag options to blanks, or click blank then click option'
Arun script
BRunScript
CRun Script
Drun_script
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable-like names without spaces for displayName.
Omitting displayName or using invalid characters.
4fill in blank
hard

Fill both blanks to define a job with a name and a step that runs a script.

Azure
jobs:
- job: [1]
  steps:
  - script: echo Build started
    displayName: '[2]'
Drag options to blanks, or click blank then click option'
ABuildJob
BDeployJob
CStart Script
DInitialize
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces in job names.
Using unclear or generic display names.
5fill in blank
hard

Fill all three blanks to define a pipeline with trigger, pool, and a script step.

Azure
trigger:
  branches:
    include:
      - [1]
pool:
  vmImage: '[2]'
steps:
- script: echo Build running
  displayName: '[3]'
Drag options to blanks, or click blank then click option'
Amain
Bubuntu-latest
CRun Build
Ddevelop
Attempts:
3 left
💡 Hint
Common Mistakes
Triggering on a non-main branch unintentionally.
Using an outdated vmImage.
Using unclear step display names.