AZ-400 · Question #362
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 p
The correct answer is C. extends: template: templatel.yml parameters: usersteps:. 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 template provides the outer structure of the pipeline and a set of places where the templ
Question
Options
- Aparameters: usersteps: extends: template: template1.yml
- Btemplate: template1.yml parameters: usersteps:
- Cextends: template: templatel.yml parameters: usersteps:
- Dparameters: usersteps: - template: templatel.yml
How the community answered
(50 responses)- A4% (2)
- B6% (3)
- C76% (38)
- D14% (7)
Explanation
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 template provides the outer structure of the pipeline and a set of places where the template consumer can make targeted alterations. template: template.yml@templates - 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
Community Discussion
No community discussion yet for this question.