BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft Exam AZ-400 Topic 2 Question 43 Discussion

Actual exam question for Microsoft's AZ-400 exam
Question #: 43
Topic #: 2
[All AZ-400 Questions]

You have a project in Azure DevOps.

You create the following YAML template named Template1.yml.

steps:

- script: npm install

- script: yarn install

- script: npm run compile

You create the following pipeline named File1.yml.

parameters:

usersteps:

- task: MyTask@1

- script: echo Done

You need to ensure that Template1.yaml runs before File1.yml.

How should you update File1.yml?

Show Suggested Answer Hide Answer
Suggested Answer: C

Azure Pipelines offers two kinds of templates: includes and extends. Included templates behave like #include in C++: it's as if you paste the template's code right into the outer file, which references it. To continue the C++ metaphor, extends templates are more like inheritance: the template provides the outer structure of the pipeline and a set of places where the template consumer can make targeted alterations.

Example:

extends:

template: template.yml@templates

parameters:

usersteps:

- script: echo This is my first step

- script: echo This is my second step


https://docs.microsoft.com/en-us/azure/devops/pipelines/security/templates

Contribute your Thoughts:

Currently there are no comments in this discussion, be the first to comment!


Save Cancel