DRAG DROP (Drag and Drop is not supported)You have a GitHub repository named repo1 that stores the code of an app named App1.You need deploy a workflow for repo1 by using GitHub Actions. The solution must meet the following requirements:-Scan on pushes to the main branch.-Scan on pull requests to the main branch.-Scan on pull requests to any branch that has a prefix of releases/.-Scan all the files in the subdirectories of the src directory.-Exclude scanning of markdown files.How should you complete the code? To answer, drag the appropriate values to the correct targets. Each value 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:
Answer(s): A
Box 1: - 'releases/**'Scan on pull requests to any branch that has a prefix of releases/.Note: You can use special characters in path, branch, and tag filters.*: Matches zero or more characters, but does not match the / character. For example, Octo* matches Octocat. **: Matches zero or more of any character.Box 2: - 'src/**'Scan all the files in the subdirectories of the src directory.Use the paths filter when you want to include file path patterns or when you want to both include and exclude file path patterns.Box 3: - '**/*.md'Exclude scanning of markdown files.Use the paths-ignore filter when you only want to exclude file path patterns.
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-she et
DRAG DROP (Drag and Drop is not supported)You use Git for source control.You delete a file, commit the changes, and continue to work.You need to recover the deleted file.Which three 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:
Step 1: git log.Find the commit SHA of the commit you want to revert to. To look through a log of commits, type git log.Step 2: git checkout [hash]~1 --path/to/fileIf you have deleted the file and already committed the changes, you need to use the `git checkout` command to restore the file. First, you need to find out the checksum of the commit that deleted the file, and then check out the file from the previous commit.This command tells `git` to list all commits, which can be reached from the HEAD, that changed the file `file1.txt`. The `-n 1` option tells `git` to limit the result to only one commit. The output is the checksum of the commit that deleted the file.To undo changes on a single file or directory from commit B, but retain them in the staged state:git checkout <commit-B-SHA> <fileStep 3: git commitCommits the restored file to the repository.
DRAG DROP (Drag and Drop is not supported)You have an Azure Repos repository named repo1.You need to clone repo1. The solution must clone only a directory named src/web.How should you complete the script? To answer, drag the appropriate values to the correct targets. Each value 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:
Box 1: https://dev.azure.com/organization/project/_git/repo1If you are considering using Scalar with the GVFS protocol and Azure Repos, then you can try cloning a new enlistment using scalar clone <url>. Scalar automatically registers this new enlistment, so it will benefit from all the config options and maintenance described above.Example: By following the snippet below, you can clone a mirror of the Scalar source code using the GVFS protocol:$ scalar clone https://dev.azure.com/ms-scalar/_git/scalarClone parameters:Repo URL: https://dev.azure.com/ms-scalar/_git/scalarBranch: DefaultEtc.Box 2: repo1/srcThe solution must clone only a directory named src/webWhen using scalar clone, the working directory contains only the files at root using the Git sparse-checkout feature in cone mode. You can expand the files in your working directory using the git sparse-checkout set command.Example continued:$ cd scalar/srcBox 3: webExample continued:git sparse-checkout set Scalar Scripts/Mac
https://devblogs.microsoft.com/devops/introducing-scalar/
Your development team is building a new web solution by using the Microsoft Visual Studio integrated development environment (IDE).You need to make a custom package available to all the developers. The package must be managed centrally, and the latest version must be available for consumption in Visual Studio automatically.Which three actions should you perform? Each correct answer presents part of the solution.Note: Each correct selection is worth one point.
Answer(s): A,B,E
B: By using your custom NuGet package feed within your Azure DevOps (previously VSTS) instance, you’ll be able to distribute your packages within your organization with ease.Start by creating a new feed.A: We can publish, pack and push the built project to our NuGet feed.E: Consume your private NuGet FeedGo back to the Packages area in Azure DevOps, select your feed and hit “Connect to feed”. You’ll see some instructions for your feed, but it’s fairly simple to set up.Just copy your package source URL, go to Visual Studio, open the NuGet Package Manager, go to its settings and add a new source. Choose a fancy name, insert the source URL. Done.Search for your package in the NuGet Package Manager and it should appear there, ready for installation. Make sure to select the appropriate feed (or just all feeds) from the top right select box.
https://medium.com/medialesson/get-started-with-private-nuget-feeds-in-azure-devops-8c7b5f022a68
You manage code by using GitHub.You plan to ensure that all GitHub Actions are validated by a security team.You create a branch protection rule requiring that code changes be reviewed by code owners.You need to create the CODEOWNERS file.Where should you create the file?
GitHub supports a CODEOWNERS file in the .github/ directory. This file defines the security team as the required reviewer for GitHub Actions changes. When branch protection requires code owner reviews, changes to protected files must be approved by the designated code owners.
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-rep ository/about-code-owners
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.