I'm working with a Git repo that contains several modules. I only want a triggered build's dependencies to be rerun if there were changes in the specified module's directory, but not when changes were made in another module's directory.
It's easy to focus the build trigger on a specific directory, even in Git. However, keeping one of its dependencies suitable when its focus is just a subset of it's dependent's trigger(s) is more complex.
Keep in mind that with Git, a job cannot check out merely a subdirectory of the repository. It must check out the entire thing. Since build configurations are linked to what they check out, I can only find out how to limit the dependent job's trigger based on a specific subdirectory. I don't see how its dependencies can also be linked to to those subdirectories alone, thus remaining suitable if their subdirectories remain unchanged.
For example, say I've got the following directory structure....
-root (Repo 1)
*** code files
*** code files
...and the following build pipeline...
Compile <- Build <- Deploy <- Release
Release's trigger keys off of the Project1 directory, but Compile only needs to be declared unsuitable if change occur within the code directory. Now say a change was made to just the pom.xml, thus triggering the Release Job. I only need the Build job and its dependents to rerun. (As a side note, I also have to have the pom.xml for Compile to run; just not to rerun it if changed.) How do I tell TC to consider Compile suitable and Build not suitable for the Release jobs rerun pipeline?
As an extention to the example above, suppose the Release job also has a second VCS trigger linked to the following repo:
-root (Repo 2)
Let's also say that only the Deploy job is also attached to Repo 2. Now suppose changes are made under Repo 1 - Project2. Release's first trigger does not fire, since it is only keying off of Repo 1 - Project1. But then something changes in Repo 2 that catches Release's second trigger. This time, no changes were made even under the first trigger, but changes were made inside Repo 1. How do we keep the Compile and Build jobs from being considered unsuitable?