1

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
TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

2

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
Vivek Kodira
  • 2,764
  • 4
  • 31
  • 49