I have a Cloud Build in GCP that pulls from github and builds images when a PR merges to master. However I would like to restrict builds to occur only when a particular folder gets modified. There is a similar functionality in TeamCity by specifying Trigger Rules.
Asked
Active
Viewed 2,622 times
1 Answers
3
The Included files
trigger setting does allow you to specify which files trigger a build. It does support globbing, patterns such as directory/* to trigger on changes to specific directory. Here is a snippet from the cloud build documentation -
Included files (optional): Changes to these files will trigger a build. You can use glob strings to specify multiple files with wildcard characters. Acceptable wildcard characters include the characters supported by Go Match, **, and alternation

Daniel t.
- 9,291
- 1
- 33
- 36