You have an app that is deployed to two environments named Production-A and Production-B by using Azure Pipelines.
You need to configure a release pipeline that will mark the app as complete and ready for release into the Production-B environment. The solution must meet the following requirements:
• Ensure that there are no active Azure Monitor alerts in the Production-A environment before the app is marked as complete.
• Minimize administrative effort.
What should you do?
A. To the Production-B environment stage, add a pre-deployment gate that will query Azure Monitor.
B. To the Production-A environment stage, add a post-deployment gate that will query Azure Monitor.
C. To the Production-A environment stage, add a post-deployment approval.
D. To the Production-A environment stage, add a pre-deployment gate that will query Azure Monitor.
Show Answer
Correct Answer: B
Explanation: A post-deployment gate on the Production-A stage runs after deployment to Production-A and before that stage is marked successful/completed. Configuring the gate to query Azure Monitor ensures there are no active alerts before the stage is considered complete and before the release can proceed to Production-B. This directly matches the requirement while using built-in gates, minimizing administrative effort.
Question 43
You use an Azure Pipelines pipeline to build and deploy an app.
You have a custom test task that has the following inputs:
• testResultsFiles: **/TEST-*.trx
• searchFolder: $(System.DefaultWorkingDirectory)
• mergeTestResults: true
Which format should you use for the input data of testResultsFiles?
A. VSTest
B. NUnit
C. CTest
D. JUnit
Show Answer
Correct Answer: A
Explanation: The pattern `**/TEST-*.trx` matches Visual Studio Test result files with the `.trx` extension. In the Publish Test Results task, `.trx` files correspond to the `VSTest` test results format. The other formats (JUnit, NUnit, and CTest) typically use different XML schemas and file conventions.
Sources:
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-test-results-v2?view=azure-pipelines
https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/PublishTestResultsV2/task.json
Question 44
DRAG DROP
-
You have a GitHub organization.
You are creating a GitHub Actions workflow.
You need to perform authenticated API requests by using a GitHub app name App1.
Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Show Answer
Correct Answer: Register App1 and store the app ID as a GitHub Actions secret.
Generate a private key and store the key as a secret.
Generate a JSON Web Token (JWT).
Generate an installation access token.
Explanation: For GitHub Actions authentication with a GitHub App, store the app ID and private key as secrets, use them to create a JWT, then exchange the JWT for an installation access token to authenticate API requests.
Question 45
DRAG DROP
-
You have an Azure subscription.
You have the standards shown in the following table.
You plan to use Azure Pipelines to build and release web apps.
You need to recommend a solution to build the pipelines. The solution must meet the following requirements:
• Ensure that all new pipelines meet the security requirements defined in Standard1.
• Ensure that the first stage of all new pipelines contains the software prerequisites defined in Standard2.
• Minimize administrative effort.
What should you use to implement each standard? To answer, drag the appropriate options to the correct standards. Each component 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.
Show Answer
Correct Answer: Standard1: An extends template
Standard2: An includes template
Explanation: Use an extends template to enforce required security controls across all new pipelines. Use an includes template to insert a standardized first stage containing the required software prerequisites while minimizing administrative effort.
Question 46
You have an Azure Resource Manager (ARM) template that contains the following expression.
[if(parameters('isComplete'), '1a', '2a')]
You need to migrate the template to Bicep.
Which expression should you run?
A. iif(isComplete, '1a', '2a')
B. if(isComplete, '1a', '2a')
C. if('isComplete') '1a' else '2a'
D. isComplete ? '1a' '2a'
Show Answer
Correct Answer: D
Explanation: In ARM templates, if(condition, trueValue, falseValue) is migrated in Bicep to the ternary conditional operator: condition ? trueValue : falseValue. Therefore the equivalent is `isComplete ? '1a' : '2a'`. Among the options, D is clearly intended, but the colon appears to be missing due to a typo/OCR error. Bicep does not use an `if()` or `iif()` expression for this kind of value selection.
Question 47
HOTSPOT
-
You have an Azure Pipelines pipeline that has the following definition.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: 1. No
2. Yes
3. No
Explanation: B and C both depend only on A, so they can run in parallel after A completes. D depends on both B and C, so it cannot start until both finish. E depends on B and D; since D already requires C, E also cannot start before C completes.
Question 48
HOTSPOT
-
You have an Azure Pipelines pipeline named Pipeline1 that has the following YAML definition.
For each of the following statements, select Yes if True. Otherwise select No.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: No
No
Yes
Explanation: The YAML shows a single implicit stage containing three tasks, not three stages. BuildPlatform is not a predefined Azure Pipelines variable; it is commonly user-defined. System.DefaultWorkingDirectory is a predefined system variable.
Question 49
You manage a project by using Azure Boards. You manage the project code by using GitHub.
You have three work items that have IDs of 456, 457, and 458.
You need to create a pull request that will be linked to all the work items. The solution must set the state of work item 456 to done.
What should you add to the commit message?
A. Done #456, #457, #458
B. Fixes #456, #457, #458
C. Fixes #AB456, #A8457, #A8458
D. #AB456, #AB457, #AB458 Completed #AB456
Show Answer
Correct Answer: C
Explanation: When linking GitHub commits or pull requests to Azure Boards work items, Azure Boards recognizes the AB#<id> syntax. Using the closing keyword 'Fixes' transitions the referenced work item to Done/Completed when appropriate while linking the referenced work items. Although the option contains apparent typos ('#AB' instead of 'AB#' and 'A8' instead of 'AB'), it is clearly intended to represent the Azure Boards syntax. The correct syntax would be 'Fixes AB#456, AB#457, AB#458'.
Question 50
HOTSPOT
-
You have an Azure subscription that contains a user named User1.
You have an Azure Resource Manager (ARM) template named Template1.
You plan to perform the following actions:
• Deploy an Azure key vault named KV1.
• Deploy Azure resources by using Template1 to retrieve secrets from KV1.
You need to ensure that User1 can deploy Template1. The solution must follow the principle of least privilege.
Which permission should you grant to User1, and which parameter should be specified when you create KV1? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation: ARM templates that retrieve secrets from Key Vault require the deploy/action permission on the vault and the vault must be enabled for template deployment to allow secret access during deployment.
Question 51
You have an Azure subscription.
You use Bicep templates to deploy websites and Azure SQL infrastructure.
You need to automate the deployments by using Azure Pipelines and a self-hosted agent that runs on two virtual machines. The solution must minimize administrative effort.
What should you do first?
A. Create a service principal.
B. Create an Azure Automation account.
C. Create a user-assigned managed identity.
D. On each virtual machine, enable a system-assigned managed identity.
Show Answer
Correct Answer: A
Explanation: The first prerequisite for Azure Pipelines to deploy Azure resources with Bicep is an identity that Azure DevOps can use for an Azure service connection. A service principal is the standard authentication mechanism and works regardless of where the self-hosted agents run. Managed identities apply to Azure resources and require the agents to run on Azure VMs; the scenario does not guarantee that. Azure Automation is unrelated to Azure Pipelines deployment authentication.
$19
Get all 534 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.