I have a monorepo in GitLab with a Feature Branch approach.
What I'm trying to achieve is to launch the part of the pipeline associated to the directory containing the altered files. So my .gitlab-ci.yml looks like :
job1:
stage: build
script:
- ...
only:
changes:
- myparentdir/dir1/*
job2:
stage: build
script:
- ...
only:
changes:
- myparentdir/dir2/*
- Create a new branch from develop
- Commit myparentdir/dir2/test.txt on this branch
- The pipeline launch every build jobs !
It seems like GitLab is considering every files as altered when working with a new feature branch.
Do you know any workaround?