Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path filtering based on changes in "root" directory of project #91

Open
rajnishpadda opened this issue Oct 4, 2023 · 2 comments
Open

Comments

@rajnishpadda
Copy link

Describe Request: Path filtering based on changes in "root" directory of project

Examples: With current version of path-filtering orb, I cannot specify root directory mapping and trigger selective job in work flow. I tried using various combinations of specifying mapping e.g. "./.*"

Intent here is to triggered selective jobs based on changes in root directory like it does for subdirectories in the project.

Supporting Documentation Links:

@rajnishpadda
Copy link
Author

rajnishpadda commented Oct 4, 2023

version: 2.1
setup: true

orbs:
  path-filtering: circleci/[email protected]

# Define the jobs we want to run for this project
workflows:
  setup:
    jobs:
      - path-filtering/filter:
          name: Check-updated-files
          base-revision: my-branch
          config-path: .circleci/continue_config.yml
          #Syntax: <regex path-to-test> <parameter-name> <parameter-value-to-set>
          mapping: |
            packages/abc/.* build-abc true
            packages/xyz/.* build-xyz true
            packages/shared/.* build-all true
            packages/bin/.* build-all true
            /home/circleci/project/.* build-all true 

For subdirectories patterns packages/[abc,xyz]/.* , jobs are triggering. However if I change any file under repo's ROOT directory, jobs do not trigger.

For specifying root mapping pattern I have used following

.*
./.*
..*
~/project/.*
/home/circleci/project/.*

None of above expressions works to compare and trigger jobs for changed files in ROOT path of repo.

@acornford-droneup
Copy link

acornford-droneup commented May 8, 2024

bump. This is a result of some forced regex.
for those who run into this and need a temp fix as of @1.0.0 change ./.foo foo-var true -> .*.foo foo-var foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants