bibendi / dip

The dip is a CLI dev–tool that provides native-like interaction with a Dockerized application.
MIT License
1.26k stars 44 forks source link

Modules section for dip #173

Closed emfy0 closed 3 months ago

emfy0 commented 3 months ago

Context

Managing group of projects with dip is hard, imagine having multiple gems with such setup

interaction:
  brakeman:
    description: Check brakeman sast
    command: docker run ...
  gitleaks:
    description: Check gitleaks sast
    command: docker run ...
  bearer:
    description: Check bearer sast
    command: docker run ...
  trivy:
    description: Check trivy sast
    command: docker run ...

Every change in sast configuration leads to change in all dip.yml among gems.

Related tickets

-

What's inside

This PR introduces new concept of modules, modules are stored in .dip folder. This folder should be synced among group for example with git submodules, so it is stored in one place and synced among group.

Each module contains dip configuration so it can be splitted logically, e.g.

# ./.dip/sasts.yml
interaction:
  brakeman:
    description: Check brakeman sast
    command: docker run ...
  gitleaks:
    description: Check gitleaks sast
    command: docker run ...
  bearer:
    description: Check bearer sast
    command: docker run ...
  trivy:
    description: Check trivy sast
    command: docker run ...

Now sasts are managed in one place and can be included via modules.

# ./dip.yml
modules:
  - sasts

interaction:
  my_special_task:
     ....

See more examples in README

Checklist:

bibendi commented 3 months ago

Hey, Pavel! This is a great feature! Thank you for the contribution!

bibendi commented 3 months ago

I'll bump a new version today

bibendi commented 3 months ago

v8.1.0 has been released