Our project is nested inside a mono-repository. Imagine this, we have a project in a "projects" folder. For example "projects/our-project". Well, we would like to be able to check our .drone.yml into just "our-project" but it appears Drone wants the configuration file at the root of the project, which is ok, we can work with that by changing the "commands" section of our builds. The trouble we are running into is that we only want to run the builds when something in "our-project" changes. I can't find a way to do that precisely with Drone so our next closest bet is conditions, I figure we can make namespace all branches for "our-project" like this "our-project/some-branch". Then we could set up a condition, to only run builds on "our-project/some-branch" and "master" this would limit the number of "fake builds" we are running from other projects branches:
build:
when:
branch:
- master
- our-project/*
The trouble is when we try to pull request from a "our-project/" branch to "master" the build won't run, I'm guessing because its being run on a merge commit which isn't in master or "our-project/"
My question is two fold: 1. What is the best way to leverage drone using the mono repository pattern (multiple projects, one repository) 2. If Drone doesn't have support for that pattern or isn't designed for it, what is the best work-around to limit "fake builds"
Note: We could at the beginning of our build check for changes in our sub-folder and return a green if there aren't any. I this a recommended approach?