bitsbeats / drone-tree-config

Drone helper for mono repositories.
Apache License 2.0
103 stars 24 forks source link

Add consider file support #32

Closed mach6 closed 3 years ago

mach6 commented 3 years ago

Adds support for a per repo .drone.yml inventory file called the "consider file" which, when specified, will influence how drone-tree-config finds the .drone.yml files for the target repo.

Unrelated change: Fix markdown-lint errors in README.md

foosinn commented 3 years ago

What do you thing about a consider file that also supports setting the max-depth and also maybe a glob pattern?

Downside is that this could add a lot of complexity.

foosinn commented 3 years ago

What do you think about https://github.com/foosinn/drone-tree-config/commit/b5de0a54d2a29eeafbb4b094c05b9fb8ecd98742

mach6 commented 3 years ago

I've rebased this from the latest bitbeats:master

mach6 commented 3 years ago

What do you thing about a consider file that also supports setting the max-depth and also maybe a glob pattern?

Downside is that this could add a lot of complexity.

Interesting idea.

My primary goal was to remove the need to walk the (relative or complete -- depending on the event) repository tree looking for .drone.yml files... The max-depth and glob approach could reduce the need to walk "all_of" the tree in the cron and tag events. However, it does not remove it.

It will add some complexity but it certainly can be done.

Perhaps in a future PR though?

mach6 commented 3 years ago

What do you think about foosinn@b5de0a5

I like the simplification. However, I do have some concerns -- which I added inline on the commit.

It seems some of the plugin_tests.go changes that I wrote in this PR were lost in the merge conflict resolution. I've rebased this PR, and addressed the merge conflict in plugin_tests.go, FYI.

If you would like me to make an update (to this PR) incorporating your suggests, my feedback, and the intent, LMK..

Cheers!

mach6 commented 3 years ago

@foosinn I went ahead and updated this PR based on the simplification in your proposal, my feedback, etc.

foosinn commented 3 years ago

Thanks a lot for your work!