We use Google Cloud Build to run different tests for our Github repository when we push a branch. Our problem is that only the last commit in the branch seems to affect which triggers are run.
E.g. say our repository looks like this:
./client/<client code>
./server/<server code>
and in our two triggers we specify the Included files filter like this:
- trigger 1: Included files:
client/** - trigger 2: Included files:
server/**
the problem is that only the last commit in the branch that should trigger builds affects which triggers to run.
To illustrate the problem: say we push a branch with the following commits:
- Commit 1: <Changes to client/foo.js>
- Commit 2: <Changes to server/bar.scala>
only "trigger 2" is run. And what we want is that both triggers are run, since we want to run tests for all the changes introduced by our branch.
Is there any way to get GCB to "see" all the changes in the branch that is pushed, when deciding which triggers to run? The obvious quick-fix is to create branches with single commits, which makes all the triggers run, but is less than ideal from the perspective of our git workflow.