HOTSPOT - How should you configure the filters for the Project5 trigger? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:
Suggested Answer:
Box 1: branch filter to exclude - Scenario: Continuous integration (CI) triggers cause a build to run whenever a push is made to the specified branches or a specified tag is pushed.
Box 2: branch filter to include - You can specify branches to include and exclude. For example: # specific branch build trigger: branches: include: - master - releases/* exclude: - releases/old* Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers
I think it's
-Path filter to exclude
-Path filter to include
Because '/.' is not the name of a branch.
Check this example: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#wildcards
I think you are right.
https://mohitgoyal.co/2018/09/19/using-path-filters-in-build-definition-in-azure-devops-vsts/
"To properly specify an exclusion path, we need to also define an inclusion path. It may be something specific like /teraVis (in our case) or just root i.e. /"
I think you are right as explained in the article you cited (https://mohitgoyal.co/2018/09/19/using-path-filters-in-build-definition-in-azure-devops-vsts/), so the answer must be
-Path filter to exclude /folder1
-Path filter to include /
Although a branchfilter is needed when using a pathfilter, "/" is not a valid branchefilter. A branchefilter must be something like "main" or "develop", etc.
"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."
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#paths
Correct answers are:
Path filter to exclude
Branch filter to include
https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers -> right under Paths title -> When you specify paths, you must explicitly specify branches to trigger on if you are using Azure DevOps Server 2019.1 or lower. 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. If you are using Azure DevOps Server 2020 or newer, you can omit branches to filter on all branches in conjunction with the path filter.
GPT-4: 1. Set a path filter to exclude `/folder1` (option c): A path filter allows you to specify which files or folders in your repository should trigger a build when they are changed. In this case, setting a path filter to exclude `/folder1` will prevent changes within `/folder1` of the repository from triggering a build.
2. Set a branch filter to include `/` (option b): A branch filter allows you to specify which branches in your repository should trigger a build when they are changed. In this case, setting a branch filter to include `/` will allow changes in any branch of the repository to trigger a build.
These two actions will configure the continuous integration trigger for Project4 to initiate a build in response to any change in the repository except for changes within `/folder1` of the repository.
I would agree with the given answer
Branch filter to include / would include all code from triggering a build
Path filter to exclude /folder 1 for first drop down is correct to address 'except for changes in /folder 1"
I would go for
-Path filter exclude
-Path filter include
If you exclude a path, you cannot also include it unless you qualify it to a deeper folder.
For example if you exclude /tools then you could include /tools/trigger-runs-on-these
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#:~:text=If%20you%20exclude%20a%20path%2C%20you%20cannot%20also%20include%20it%20unless%20you%20qualify%20it%20to%20a%20deeper%20folder.%20For%20example%20if%20you%20exclude%20/tools%20then%20you%20could%20include%20/tools/trigger%2Druns%2Don%2Dthese
This section is not available anymore. Please use the main Exam Page.AZ-400 Exam Questions
Log in to ExamTopics
Sign in:
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.
Kazillius
Highly Voted 3 years, 4 months agordemontis
2 years, 7 months agoKosky
3 years, 3 months agopdk88
2 years, 2 months agoTrangNguyen_6
3 years, 4 months agolugospod
Highly Voted 2 years, 9 months agovsvaid
Most Recent 10 months, 3 weeks agovsvaid
11 months agoyana_b
1 year, 3 months agozellck
1 year, 5 months agoFal991l
1 year, 7 months agosyu31svc
2 years, 3 months agoEltooth
2 years, 6 months agoMev4953
2 years, 9 months agoSara_Mo
2 years, 10 months agocelciuz
3 years, 2 months ago