Practice Test 1 | Designing and Implementing Microsoft DevOps Solutions | AZ-400 | Dumps | Mock Test
View Case Study
You need to comply with the requirement for the project “whizlabD”. Which of the following would you set for the folder /*?
A. A branch filter to exclude -data/*
B. A branch filter to include -data/*
C. A path filter to include -data/*
D. path filter to exclude -data/*
Answer – D
The branch name has not been mentioned in the question for ProjectD. So the branch name will be default i.e. master.
In the yaml file, we will specify “- /*” folder under “exclude:” element under “paths:” element under default branch “master: ” of the project “ProjectD”
When you specify paths, you must explicitly specify branches to trigger on. You can’t trigger a pipeline with only a path filter; you must also have a branch filter, and the changed files that match the path filter must be from a branch that matches the branch filter.
Below snippet shows the syntax for excluding content inside folder:
Option A is incorrect because a branch filter is applied when we have multiple branches under the same project.
Option B is incorrect because a branch filter is applied when we have multiple branches under the same project.
Option C is incorrect because the requirement is to exclude the content inside the data folder and not to include them.
Option D is CORRECT because this will exclude the content inside the data folder, the syntax is as per Microsoft documentation.
For more information on path filters, refer to the below URL:
Comments are closed, but trackbacks and pingbacks are open.