Free AZ-400 Exam Braindumps
Designing and Implementing Microsoft DevOps Solutions Questions 136–140 (page: 29)

Updated On: 10-Mar-2026

You have an Azure DevOps project named Project1 that uses an Azure Pipelines pipeline to build, test, and deploy an app named App1.

You have a credential named cred1.

You need to ensure that cred1 can be used to deploy builds of App1 to production. The solution must ensure that cred1 is available for use only by specific users and pipelines in Project1.

What should you do?

  1. Create cred1 as a secret variable in a variable group.
  2. Add cred1 as a variable to a template pipeline.
  3. Create a deployment gate for the pipelines that deploy builds of App1 to production.
  4. Add cred1 to an Azure key vault.

Answer(s): A

Explanation:

By creating cred1 as a secret variable in a variable group, you can securely store credentials that are scoped to a specific Azure DevOps project or pipeline. You can also limit access to the secret, making it available only to the specific users or pipelines that require it. This ensures both security and control over who can use the credential for deployments.



DRAG DROP (Drag and Drop is not supported)

You have a Git repository that uses project source control.

A file is committed to the repository. No further changes were made since the file was committed.

You need to remove the file from the branch history.

Which three Git commands should you run in sequence? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.

Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




To remove a file from the branch history in Git, the process typically involves rewriting the history to remove the file. Here's the correct sequence of Git commands you should run:
git rebase: This command allows you to go back and modify previous commits. Use an interactive rebase to edit the specific commit where the file was added.
git log: This helps to view the commit history and identify the commit where the file was added. git clean: After the file is removed from the history, you can use git clean to remove untracked files from your working directory, which might be helpful if the file is still present locally.

git log - to find the commit with the file git rebase - to rewrite the history and remove the file git clean - to clean up the workspace after rebasing



You use Git for source control.

You need to commit a 3-GB ZIP file that contains virtual machines used for testing. The solution must meet the following requirements:

The file must be versioned.

The file must be associated with the corresponding code commits.

Which two actions should you include in the solution? Each correct answer presents part of the solution.

Note: Each correct selection is worth one point.

  1. Install the git-stash extension and associate the extension to ZIP files.
  2. Install the git-fat extension and associate the extension to ZIP files.
  3. Install the Git LFS extension and associate the extension to ZIP files.
  4. Store files in Azure Storage and enable blob versions.
  5. Use GZip to compress the file before committing the file.

Answer(s): C,D

Explanation:

C: Configuring Git Large File Storage
Once Git LFS is installed, you need to associate it with a large file in your repository.
D: Enable and manage blob versioning
You can enable Blob storage versioning to automatically maintain previous versions of a blob when it is modified or deleted.
When blob versioning is enabled, then you can restore an earlier version of a blob to recover your data if it is erroneously modified or deleted.


Reference:

https://docs.github.com/en/repositories/working-with-files/managing-large-files/configuring-git-large-file-storage https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/storage/blobs/versioning-enable.md



You have a project in Azure DevOps.

You need to implement a new branching solution. The solution must ensure that all pull requests meet the following requirements:

Include linked work items.

Pass build validation policies.

Require at least three reviewers.

What should you include in the solution?

  1. pull request templates
  2. branch policies
  3. pull request permissions
  4. branch security

Answer(s): B

Explanation:

Branch policies help teams protect their important branches of development. Policies enforce your team's code quality and change management standards.
Require a minimum number of reviewers
Code reviews are important for software development projects. To ensure that teams review and approve PRs, you can require approval from a minimum number of reviewers. The basic policy requires that a specified number of reviewers approve the code, with no rejections.
Check for linked work items
For work item management tracking, you can require associations between PRs and work items. Linking work items provides more context for changes, and ensures that updates go through your work item tracking process.
Build validation
You can set a policy requiring PR changes to build successfully before the PR can complete. Build policies reduce breaks and keep your test results passing. Build policies help even if you're using continuous integration (CI) on your development branches to catch problems early.

A build validation policy queues a new build when a new PR is created or changes are pushed to an existing PR that targets the branch. The build policy evaluates the build results to determine whether the PR can be completed.


Reference:

https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies



You have an Azure subscription that contains an Azure container registry. The container registry contains an ACR Tasks task named Task1. Task1 is configured to run once every five days.

You need to trigger Task1 to run immediately.

Which command should you run?

  1. az acr task run
  2. az acr build
  3. az acr taskrun
  4. az acr run

Answer(s): A

Explanation:

ACR Tasks supports multi-step, multi-container-based workflows that can automatically trigger when you commit source code to a Git repository.
Test the multi-step workflow
To test the multi-step task, trigger it manually by executing the az acr task run command:
az acr task run --registry $ACR_NAME --name example1


Reference:

https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-multistep-task



Viewing page 29 of 72
Viewing questions 141 - 145 out of 398 questions


Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!