exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 7 question 26 discussion

Actual exam question from Microsoft's AZ-400
Question #: 26
Topic #: 7
[All AZ-400 Questions]

DRAG DROP -
You are configuring the settings of a new Git repository in Azure Repos.
You need to ensure that pull requests in a branch meet the following criteria before they are merged:
✑ Committed code must compile successfully.
✑ Pull requests must have a Quality Gate status of Passed in SonarCloud.
Which policy type should you configure for each requirement? To answer, drag the appropriate policy types to the correct requirements. Each policy type 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:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: A check-in policy -
Administrators of Team Foundation version control can add check-in policy requirements. These check-in policies require the user to take actions when they conduct a check-in to source control.
By default, the following check-in policy types are available:
✑ Builds Requires that the last build was successful before a check-in.
✑ Code Analysis Requires that code analysis is run before check-in.
✑ Work Items Requires that one or more work items be associated with the check-in.

Box 2: Build policy -
Reference:
https://docs.microsoft.com/en-us/azure/devops/repos/tfvc/add-check-policies https://azuredevopslabs.com/labs/vstsextend/sonarcloud/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Sylph
Highly Voted 4 years, 1 month ago
Should be: A build policy A status policy https://azuredevopslabs.com/labs/vstsextend/sonarcloud/ https://docs.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops#build-validation
upvoted 118 times
ahaz
3 years, 11 months ago
I agree
upvoted 2 times
...
rdemontis
3 years, 1 month ago
thanks for sharing the articles
upvoted 1 times
...
noussa
4 years ago
I agree, I checked directly on Azure DevOps since I use it at work and as u said: A build policy A status policy
upvoted 9 times
...
Optimist_Indian
3 years, 3 months ago
Got this question in Feb-2022 exam (scored 910+). This is correct answer.
upvoted 12 times
...
...
francis6170
Highly Voted 3 years, 10 months ago
Got this in the AZ-400 exam (June 2021).
upvoted 11 times
...
MrAZ105
Most Recent 7 months, 1 week ago
build validation and status policy
upvoted 1 times
...
4bd3116
1 year ago
To ensure that your pull requests meet the specified criteria in Azure Repos, you should configure the following policy types: For the requirement that committed code must compile successfully, you should configure a build policy. This policy will enforce that all code submitted in pull requests is built and passes all the configured tests before it can be merged. For the requirement that pull requests must have a Quality Gate status of Passed in SonarCloud, you should configure a status policy. This policy will check the integration with SonarCloud to ensure that the code quality meets the defined standards before allowing the merge.
upvoted 1 times
...
Kalaisuran
1 year, 1 month ago
build policy status policy check policy are available only for TFVersion control https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/add-check-policies?view=azure-devops
upvoted 1 times
...
ozbonny
1 year, 2 months ago
A build policy A status policy
upvoted 1 times
...
Hillah
1 year, 4 months ago
build policy status policy
upvoted 1 times
...
vsvaid
1 year, 5 months ago
Build Policy Status Policy
upvoted 1 times
...
varinder82
1 year, 5 months ago
Final answer after reading all the commnts 1. build policy 2. status policy
upvoted 2 times
...
DGladiator
1 year, 12 months ago
Action 1: Committed code must compile successfully Policy: Build policy A build policy is used to ensure that any changes made to the code can be successfully built. This means that before changes can be merged, the code must compile successfully, which is the requirement you're trying to enforce. By using a build policy, you can ensure that every pull request builds successfully before it's merged into the main branch. Action 2: Pull requests must have a Quality Gate status of Passed in SonarCloud Policy: Status policy A status policy requires that an external service posts a status to the pull request. In this case, the external service would be SonarCloud. SonarCloud can analyze the code and check whether it meets the defined quality standards (Quality Gates). If it does, SonarCloud can then post a Passed status to the pull request. The status policy will then check this status before allowing the pull request to be merged. Check-in policy is a term associated with TFVC (Team Foundation Version Control), not Git, hence it is not applicable here.
upvoted 6 times
...
RonZhong
2 years, 1 month ago
Status policy for SonarCloud => https://community.sonarsource.com/t/azure-devops-pull-request-quality-gate-status-check/33957/2
upvoted 1 times
...
RonZhong
2 years, 1 month ago
[X] Check-in policy is made for TFVC https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/add-check-policies?view=azure-devops
upvoted 1 times
...
Rams_84zO6n
2 years, 2 months ago
build, status Successful last build, code analysis and work item association can be verified before every code commit in check-in policy. But this question is about PR request and not individual check-ins.
upvoted 1 times
...
syu31svc
2 years, 9 months ago
https://azuredevopslabs.com/labs/vstsextend/sonarcloud/ Committed code must compile successfully ---> Build policy Pull requests must pass ---> Status Policy
upvoted 3 times
...
tjeerd
2 years, 9 months ago
On exam 20220727. Answer is: Build policy Status policy
upvoted 4 times
...
gs12345
3 years, 4 months ago
As per "Administrators of Team Foundation version control can add check-in policy.." So Microsoft docs clearly mentions Check-in policy is for TFVC not Git, for git it is build policy. answer is build and status policy as
upvoted 4 times
...
malikimran21
3 years, 5 months ago
this came in today exam Az-400 (Dec 2021)
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago