Exams > Microsoft > AZ-400: Microsoft Azure DevOps Solutions
AZ-400: Microsoft Azure DevOps Solutions
Page 16 out of 38 pages Questions 151-160 out of 371 questions
Question#151

Your company uses cloud-hosted Jenkins for builds.
You need to ensure that Jenkins can retrieve source code from Azure Repos.
Which three actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Create a webhook in Jenkins.
  • B. Add the Team Foundation Server (TFS) plug-in to Jenkins.
  • C. Add a personal access token to your Jenkins account.
  • D. Create a personal access token (PAT) in your Azure DevOps account.
  • E. Create a service hook in Azure DevOps.
Discover Answer Hide Answer

Answer: BCD
B: Jenkins requires a plug-in to connect to TFS and check for updates to a project.
Jenkins' built-in Git Plugin or Team Foundation Server Plugin can poll a Team Services repository every few minutes and queue a job when changes are detected.
C: Use Azure DevOps/ Visual Studio Team Services to create a Personal access token.
D: After you have generated credentials using Visual Studio Team Services, you need to use those credentials in Jenkins.
Reference:
http://www.aisoftwarellc.com/blog/post/how-to-setup-automated-builds-using-jenkins-and-visual-studio-team-foundation-server/2044

Question#152

DRAG DROP -
Your company has four projects. The version control requirements for each project are shown in the following table.

You plan to use Azure Repos for all the projects.
Which version control system should you use 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:
Box 1: Team Foundation Version Control
TFVC lets you apply granular permissions and restrict access down to a file level.

Box 2: Git -
Git is the default version control provider for new projects. You should use Git for version control in your projects unless you have a specific need for centralized version control features in TFVC.

Box 3: Subversion -
Note: Xcode is an integrated development environment (IDE) for macOS containing a suite of software development tools developed by Apple

Box 4: Git -
Note: Perforce: Due to its multitenant nature, many groups can work on versioned files. The server tracks changes in a central database of MD5 hashes of file content, along with descriptive meta data and separately retains a master repository of file versions that can be verified through the hashes.
Reference:
https://searchitoperations.techtarget.com/definition/Perforce-Software https://docs.microsoft.com/en-us/azure/devops/repos/git/share-your-code-in-git-xcode https://docs.microsoft.com/en-us/azure/devops/repos/tfvc/overview

Question#153

You are automating the build process for a Java-based application by using Azure DevOps.
You need to add code coverage testing and publish the outcomes to the pipeline.
What should you use?

  • A. Bullseye Coverage
  • B. JUnit
  • C. JaCoCo
  • D. MSTest
Discover Answer Hide Answer

Answer: C
Use Publish Code Coverage Results task in a build pipeline to publish code coverage results to Azure Pipelines or TFS, which were produced by a build in
Cobertura or JaCoCo format.
Incorrect Answers:
A: Bullseye Coverage is used for C++ code, and not for Java.
Note:
There are several versions of this question in the exam. The question has two possible correct answers:
✑ Cobertura
✑ JaCoCo
Other incorrect answer options you may see on the exam include the following:
✑ Coverlet
✑ NUnit
✑ Coverage.py
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results

Question#154

HOTSPOT -
You company uses Azure DevOps to deploy infrastructures to Azure.
Pipelines are developed by using YAML.
You execute a pipeline and receive the results in the web portal for Azure Pipelines as shown in the following exhibit.

Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.
Hot Area:

Discover Answer Hide Answer

Answer:
Reference:
https://dev.to/rajikaimal/azure-devops-ci-cd-yaml-pipeline-4glj

Question#155

DRAG DROP -
You are configuring Azure DevOps build pipelines.
You plan to use hosted build agents.
Which build agent pool should you use to compile each application type? To answer, drag the appropriate build agent pools to the correct application types. Each build agent pool 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:
Box 1: Hosted macOS -
Hosted macOS pool (Azure Pipelines only): Enables you to build and release on macOS without having to configure a self-hosted macOS agent. This option affects where your data is stored.

Box 2: Hosted -
Hosted pool (Azure Pipelines only): The Hosted pool is the built-in pool that is a collection of Microsoft-hosted agents.
Incorrect Answers:
Default pool: Use it to register self-hosted agents that you've set up.
Hosted Windows Container pool (Azure Pipelines only): Enabled you to build and release inside Windows containers. Unless you're building using containers,
Windows builds should run in the Hosted VS2017 or Hosted pools.
Hosted Linux/Ubuntu 18.04 does not apply for Mac OS or for Microsoft IIS.
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents

Question#156

You are automating the build process for a Java-based application by using Azure DevOps.
You need to add code coverage testing and publish the outcomes to the pipeline.
What should you use?

  • A. Cobertura
  • B. Bullseye Coverage
  • C. MSTest
  • D. Coverlet
Discover Answer Hide Answer

Answer: A
Use Publish Code Coverage Results task in a build pipeline to publish code coverage results to Azure Pipelines or TFS, which were produced by a build in
Cobertura or JaCoCo format.
Incorrect Answers:
B: Bullseye Coverage is used for C++ code, and not for Java.
D: If you're building on Linux or macOS, you can use Coverlet or a similar tool to collect code coverage metrics. Code coverage results can be published to the server by using the Publish Code Coverage Results task. To leverage this functionality, the coverage tool must be configured to generate results in Cobertura or
JaCoCo coverage format.
F: Coverage.py is used for Python, not for Java.
Note:
There are several versions of this question in the exam. The question has two possible correct answers:
1. Cobertura
2. JaCoCo
Other incorrect answer options you may see on the exam include the following:
1. Junit
2. NUnit
3. Coverage.py
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results

Question#157

You have an existing build pipeline in Azure Pipelines.
You need to use incremental builds without purging the environment between pipeline executions.
What should you use?

  • A. a self-hosted agent
  • B. Microsoft-hosted parallel jobs
  • C. a File Transform task
Discover Answer Hide Answer

Answer: A
When you run a pipeline on a self-hosted agent, by default, none of the subdirectories are cleaned in between two consecutive runs. As a result, you can do incremental builds and deployments, provided that tasks are implemented to make use of that. You can override this behavior using the workspace setting on the job.
Incorrect Answers:
B: The workspace clean options are applicable only for self-hosted agents. When using Microsoft-hosted agents job are always run on a new agent.
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases

Question#158

HOTSPOT -
You are designing YAML-based Azure pipelines for the apps shown in the following table.

You need to configure the YAML strategy value for each app. The solution must minimize app downtime.
Which value should you configure for each app? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Discover Answer Hide Answer

Answer:
App1: rolling -
A rolling deployment replaces instances of the previous version of an application with instances of the new version of the application on a fixed set of virtual machines (rolling set) in each iteration.

App2: canary -
Canary deployment strategy is an advanced deployment strategy that helps mitigate the risk involved in rolling out new versions of applications. By using this strategy, you can roll out the changes to a small subset of servers first. As you gain more confidence in the new version, you can release it to more servers in your infrastructure and route more traffic to it.
Incorrect Answers:
runonce:
runOnce is the simplest deployment strategy wherein all the lifecycle hooks, namely preDeploy deploy, routeTraffic, and postRouteTraffic, are executed once.
Then, either on: success or on: failure is executed.
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/deployment-jobs

Question#159

You have a private project in Azure DevOps.
You need to ensure that a project manager can create custom work item queries to report on the project's progress. The solution must use the principle of least privilege.
To which security group should you add the project manager?

  • A. Reader
  • B. Project Collection Administrators
  • C. Project Administrators
  • D. Contributor
Discover Answer Hide Answer

Answer: D
Contributors have permissions to contribute fully to the project code base and work item tracking. The main permissions they don't have or those that manage or administer resources.
Reference:
https://docs.microsoft.com/en-us/azure/devops/organizations/security/permissions

Question#160

Your company has a project in Azure DevOps for a new application. The application will be deployed to several Azure virtual machines that run Windows Server
2019.
You need to recommend a deployment strategy for the virtual machines. The strategy must meet the following requirements:
✑ Ensure that the virtual machines maintain a consistent configuration.
✑ Minimize administrative effort to configure the virtual machines.
What should you include in the recommendation?

  • A. Azure Resource Manager templates and the PowerShell Desired State Configuration (DSC) extension for Windows
  • B. Deployment YAML and Azure pipeline deployment groups
  • C. Azure Resource Manager templates and the Custom Script Extension for Windows
  • D. Deployment YAML and Azure pipeline stage templates
Discover Answer Hide Answer

Answer: C
The Custom Script Extension downloads and executes scripts on Azure virtual machines. This extension is useful for post deployment configuration, software installation, or any other configuration or management tasks. Scripts can be downloaded from Azure storage or GitHub, or provided to the Azure portal at extension run time. The Custom Script Extension integrates with Azure Resource Manager templates, and can be run using the Azure CLI, PowerShell, Azure portal, or the Azure Virtual Machine REST API.
Incorrect Answers:
B: YAML doesn't work with Azure pipeline deployment groups.
Reference:
https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows

chevron rightPrevious Nextchevron right