Implement a custom CI job for auto Django model diagram generation
As a dev, I would like to have a custom CI job
that automatically generates, updates, and verifies Django model diagrams,
so that we can ensure consistent and up-to-date documentation across all Django-based repositories
without manual intervention.
Background
In our current setup, each Django project (such as card-api
, photo-api
, and orgchart
) has its own script (generate-data-model-diagrams.sh
) to generate Django model diagrams. This process is manual and prone to inconsistencies across projects. By creating a standardized CI job, we can automate this process, reduce redundancy.
Acceptance Criteria
-
The CI job should be defined in a shared CI template that can be included in the .gitlab-ci.yml
files of Django-based projects. -
The job must automatically generate a Django model diagram when a merge request is created or updated. -
The generated diagrams should be stored in a designated directory (e.g., docs/data-model/
) within the project repository. -
Documentation must be updated.