#Recommended repo structure

1 messages · Page 1 of 1 (latest)

wanton sleet
#

Hello new dagger user 👋

Coming from the old gitlab ci yaml, I’m quite pleased about the paradigm shift introduced by dagger. push and pray resonates a lot with my previous work. Still I am not quite sure how to effectively introduce dagger into my way of working: I can’t sort out yet how to change repo structure to best use dagger

  1. Dagger module sitting in same repo as the application code, using source to pull application code.

  2. Dagger module sitting in its dedicated repo, using gitref to pull application code

  3. Dagger modules across project sitting in a repo, using [dunno yet] for reusability (I guess)

I’m a solo developer planning to use Argo + k8s if that matters

What are lessons learned? Which patterns best simplify and streamline maintenance ?

Curious to hear more. Thanks a lot in advance

sour flicker
#

I recommend starting with 1. note that you can have several modules in the same repo - For a big monorepo just drop a module on each "big component" of your project, for example frontend, backend, docs etc. For a smaller repo just drop one at the root. You can change all this later, like refactoring regular code.

Then as needed, you can spin out smaller reusable modules for shared logic. Those might go in a dedicated subdirectory of your app repo; then later in a dedicated repo. Up to you if you prefer one repo for a whole collection of those modules, or one repo per module. Both are common.

#

In larger organizations typically the platform team will provide a shared library of modules to import for reusable logic