How does Jfrog Pipelines' GitRepo Include and Exclude files works? Which takes precedence?

73 views Asked by At

I want to create a GitRepo resource in my pipelines but want to use combination of include and exclude files. But I am unclear on precedence!

If the pattern I give matches with both include and exclude - how does it work?

  - name: platform_pr
    type: GitRepo
    configuration:
      gitProvider: myGithub
      path: dev/helm-values
      files:
        include: m*
        exclude: ma*
      branches:
        include: ^master$
      buildOn:
        commit: true
1

There are 1 answers

0
Leela Padmaja On

The current behavior for GitRepo resource in pipelines is as follows:

  • Take all files impacted by the commit
  • Remove all files that DON'T match the included pattern
  • Remove all files that DO match the excluded pattern
  • If any files are left, the resource is updated