Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Integrate Foundry projects with continuous integration and continuous deployment (CI/CD) pipelines

A worked example

Single answer

A Microsoft Foundry project's CI pipeline uses a reusable job template. The caller passes an agent-pool mapping to the template, and the template substitutes the complete mapping into the job's pool property. Both references shown in the exhibit must remain unchanged.

# Excerpt from azure-pipelines.yml
jobs:
- template: templates/project-check.yml
  parameters:
    executionPool:
      vmImage: ubuntu-latest

# Excerpt from templates/project-check.yml
# Parameter declarations and job steps are omitted.
jobs:
- job: ProjectCheck
  pool: ${{ parameters.executionPool }}

Which type should the template declare for executionPool?

Choose one answer
Why

Declare executionPool as an object parameter. The caller provides a YAML mapping, and the template inserts that mapping directly into pool, following the documented object-parameter pattern.

  • Correct: object. The object-parameter example accepts a mapping containing vmImage and substitutes the parameter directly into a job's pool property, matching this template.
  • Not correct: stepList. the documentation uses stepList for a parameter inserted into a job's steps. This parameter instead supplies the pool mapping, for which the documentation demonstrates object.
  • Not correct: boolean. A Boolean parameter represents a true-or-false value, as shown by the conditional-test example. It does not represent the pool mapping supplied here.
  • Not correct: string. The caller supplies a mapping rather than a scalar string. The documented pattern uses an object parameter to pass that mapping directly to the pool property.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free