Filters based on VCS changes


#1

This is something I commonly used in Teamcity. It would be great to be able to filter a job run based on VCS changes in a specified directory. For example, I have a mono-repository that contains both frontend and backend. If there are no (detected changes since the last run) in the frontend dir, I should be able to skip running the frontend tests.


#2

One way I can see to solve this right now would be to use git within the build. You can have a line that uses git diff with the last commit to see what changed.


#3

Would also love to see support for this. Seems encouraging that we can do:

workflows:
  flow:
    jobs:
      - deploy:
          filters:
            branches:
              only:
                - master

Would be fantastically useful if we could also do:

workflows:
  flow:
    jobs:
      - terraform:
          filters:
            modified_paths:
              only:
                - /^infrastructure/
      - deploy:
          requires: terraform
          filters:
            modified_paths:
              only:
                - /^app/

Where the terraform job would be a successful no-op if the current commit didn’t modify the infrastructure path.


#4

Essentially it would be good for the tools and filters to support monorepo situation better. It’s not always relevant to build every project for a change in just one.


#5

One solution to this would be to create Git mirrors for each of the sub-repos, and use those downstream repos as a build trigger.


#6