Exams > Microsoft > AZ-400: Microsoft Azure DevOps Solutions
AZ-400: Microsoft Azure DevOps Solutions
Page 15 out of 38 pages Questions 141-150 out of 371 questions
Question#141

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: [email protected]
- script: echo Done
You need to ensure that Template1.yaml runs before File1.yml.
How should you update File1.yml?

  • A. parameters: usersteps: extends: template: template1.yml - task: [email protected] - script: echo Done
  • B. template: template1.yml parameters: usersteps: - task: [email protected] - script: echo Done
  • C. extends: template: templatel.yml parameters: usersteps: - task: [email protected] - script: echo Done
  • D. parameters: usersteps: - template: templatel.yml - task: [email protected] - script: echo Done
Discover Answer Hide Answer

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: [email protected]
parameters:
usersteps:
- script: echo This is my first step
- script: echo This is my second step
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/security/templates

Question#142

You have an Azure solution that contains a build pipeline in Azure Pipelines.
You experience intermittent delays before the build pipeline starts.
You need to reduce the time it takes to start the build pipeline.
What should you do?

  • A. Enable self-hosted build agents.
  • B. Create a new agent pool.
  • C. Split the build pipeline into multiple stages.
  • D. Purchase an additional parallel job.
Discover Answer Hide Answer

Answer: D
We need to ensure that resources are available without a startup delay. We don't have enough concurrency.
To check how much concurrency you have:
To check your limits, navigate to Project settings, Parallel jobs.

Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/troubleshooting/troubleshooting

Question#143

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements:
✑ The build must access an on-premises dependency management system.
✑ The build outputs must be stored as Server artifacts in Azure DevOps.
✑ The source code must be stored in a Git repository in Azure DevOps.
Solution: Configure the build pipeline to use a Microsoft-hosted agent pool running a Linux image. Include the Java Tool Installer task in the build pipeline.
Does this meet the goal?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: A
To run your jobs, you'll need at least one agent. A Linux agent can build and deploy different kinds of apps, including Java and Android apps.
If your pipelines are in Azure Pipelines and a Microsoft-hosted agent meets your needs, you can skip setting up a private Linux agent.
The Azure Pipelines agent pool offers several virtual machine images to choose from, each including a broad range of tools and software. We support Ubuntu,
Red Hat, and CentOS.
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml

Question#144

You store source code in a Git repository in Azure Repos. You use a third-party continuous integration (CI) tool to control builds.
What will Azure DevOps use to authenticate with the tool?

  • A. certificate authentication
  • B. a personal access token (PAT)
  • C. a Shared Access Signature (SAS) token
  • D. NTLM authentication
Discover Answer Hide Answer

Answer: B
Personal access tokens (PATs) give you access to Azure DevOps and Team Foundation Server (TFS), without using your username and password directly.
Reference:
https://docs.microsoft.com/en-us/azure/devops/repos/git/auth-overview

Question#145

DRAG DROP -
You are configuring Azure Pipelines for three projects in Azure DevOps as shown in the following table.

Which version control system should you recommend for each project? To answer, drag the appropriate version control systems to the correct projects. Each version control system may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Discover Answer Hide Answer

Answer:
Project1:Git in Azure Repos -

Project2: Github Enterprise -
GitHub Enterprise is the on-premises version of GitHub.com. GitHub Enterprise includes the same great set of features as GitHub.com but packaged for running on your organization's local network. All repository data is stored on machines that you control, and access is integrated with your organization's authentication system (LDAP, SAML, or CAS).

Project3: Bitbucket cloud -
One downside, however, is that Bitubucket does not include support for SVN but this can be easily amended migrating the SVN repos to Git with tools such as
SVN Mirror for Bitbucket .
Note: SVN is a centralized version control system.
Incorrect Answers:
Bitbucket:
Bitbucket comes as a distributed version control system based on Git.
Note: A source control system, also called a version control system, allows developers to collaborate on code and track changes. Source control is an essential tool for multi-developer projects.
Our systems support two types of source control: Git (distributed) and Team Foundation Version Control (TFVC). TFVC is a centralized, client-server system. In both Git and TFVC, you can check in files and organize files in folders, branches, and repositories.
Reference:
https://www.azuredevopslabs.com/labs/azuredevops/yaml/
https://enterprise.github.com/faq

Question#146

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements:
✑ The builds must access an on-premises dependency management system.
✑ The build outputs must be stored as Server artifacts in Azure DevOps.
✑ The source code must be stored in a Git repository in Azure DevOps.
Solution: Configure an Octopus Tentacle on an on-premises machine. Use the Package Application task in the build pipeline.
Does this meet the goal?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: A
Octopus Deploy is an automated deployment server that makes it easy to automate deployment of ASP.NET web applications, Java applications, NodeJS application and custom scripts to multiple environments.
Octopus can be installed on various platforms including Windows, Mac and Linux. It can also be integrated with most version control tools including VSTS and
GIT.
When you deploy software to Windows servers, you need to install Tentacle, a lightweight agent service, on your Windows servers so they can communicate with the Octopus server.
When defining your deployment process, the most common step type will be a package step. This step deploys your packaged application onto one or more deployment targets.
When deploying a package you will need to select the machine role that the package will be deployed to.
Reference:
https://octopus.com/docs/deployment-examples/package-deployments https://explore.emtecinc.com/blog/octopus-for-automated-deployment-in-devops-models

Question#147

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements:
✑ The builds must access an on-premises dependency management system.
✑ The build outputs must be stored as Server artifacts in Azure DevOps.
The source code must be stored in a Git repository in Azure DevOps.

Solution: Install and configure a self-hosted build agent on an on-premises machine. Configure the build pipeline to use the Default agent pool. Include the Java
Tool Installer task in the build pipeline.
Does this meet the goal?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: B
Instead use Octopus Tentacle.
Reference:
https://explore.emtecinc.com/blog/octopus-for-automated-deployment-in-devops-models

Question#148

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements:
✑ The builds must access an on-premises dependency management system.
✑ The build outputs must be stored as Server artifacts in Azure DevOps.
✑ The source code must be stored in a Git repository in Azure DevOps.
Solution: Configure the build pipeline to use a Hosted VS 2019 agent pool. Include the Java Tool Installer task in the build pipeline.
Does this meet the goal?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: B
Instead use Octopus Tentacle.
Reference:
https://explore.emtecinc.com/blog/octopus-for-automated-deployment-in-devops-models

Question#149

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements:
✑ The builds must access an on-premises dependency management system.
✑ The build outputs must be stored as Server artifacts in Azure DevOps.
✑ The source code must be stored in a Git repository in Azure DevOps.
Solution: Configure the build pipeline to use a Hosted Ubuntu agent pool. Include the Java Tool Installer task in the build pipeline.
Does this meet the goal?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: B
Instead use Octopus Tentacle.
Reference:
https://explore.emtecinc.com/blog/octopus-for-automated-deployment-in-devops-models

Question#150

Your company uses a Git repository in Azure Repos to manage the source code of a web application. The master branch is protected from direct updates.
Developers work on new features in the topic branches.
Because of the high volume of requested features, it is difficult to follow the history of the changes to the master branch.
You need to enforce a pull request merge strategy. The strategy must meet the following requirements:
✑ Consolidate commit histories.
✑ Merge the changes into a single commit.
Which merge strategy should you use in the branch policy?

  • A. squash merge
  • B. fast-forward merge
  • C. Git fetch
  • D. no-fast-forward merge
Discover Answer Hide Answer

Answer: A
Squash merging is a merge option that allows you to condense the Git history of topic branches when you complete a pull request. Instead of each commit on the topic branch being added to the history of the default branch, a squash merge takes all the file changes and adds them to a single new commit on the default branch.
A simple way to think about this is that squash merge gives you just the file changes, and a regular merge gives you the file changes and the commit history.
Note: Squash merging keeps your default branch histories clean and easy to follow without demanding any workflow changes on your team. Contributors to the topic branch work how they want in the topic branch, and the default branches keep a linear history through the use of squash merges. The commit history of a master branch updated with squash merges will have one commit for each merged branch. You can step through this history commit by commit to find out exactly when work was done.
Reference:
https://docs.microsoft.com/en-us/azure/devops/repos/git/merging-with-squash

chevron rightPrevious Nextchevron right