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?
Answer(s): A
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:
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.
Answer(s): C,D
C: Configuring Git Large File StorageOnce Git LFS is installed, you need to associate it with a large file in your repository.D: Enable and manage blob versioningYou 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.
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?
Answer(s): B
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 reviewersCode 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 itemsFor 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 validationYou 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.
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?
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 workflowTo 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
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-multistep-task
Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-400 content, but please register or login to continue.