1
0
mirror of https://gitlab.com/free_zed/free_zed.gitlab.io.git synced 2024-06-09 11:52:31 +00:00

Merge branch 'puml' into 'master'

Add note : plantUML on gitlab-ci

See merge request free_zed/free_zed.gitlab.io!3
This commit is contained in:
Freezed 2019-07-21 14:01:24 +00:00
commit 55f364cbc5
2 changed files with 147 additions and 0 deletions

View File

@ -0,0 +1,73 @@
Title: Génération de diagrammes PlantUML avec Gitlab-CI
Date: 2019-07-13 10:00
Summary: Générer des diagrammes PlantUML à l'aide de l'intégration continue & l'hébergement statique de Gitlab
Category: Bloc-notes
Tags: uml, gitlab-ci, gitlab-pages, statique, ci, dry, devops, web, digitalisation
Status: Published
Lang: en
Slug: plantuml-gitlab_ci-diagramme-generation
_The easy way to keep diagrams up-to-date with the code_
What ?
------
Diagrams are :
* **100%** text described
* built with _gitlab-ci_
* deployed on _gitlab-pages_
So easy to maintain that your diagrams could be **still up-to-date** even **10 months later**!!!
How ?
-----
Just push [diagram sources][src] and [.gitlab-ci.yml][yml] will build & deploy it on _pages_ :
![Physical data model with shared files][pdm-shared].
[D.R.Y.][dry] !
---------------
Using _!include_ or _!includeurl_ PlantUML's [preprocessor][preprocessor] directives allows you to share common sources between diagrams.
In this repo, _shared files_ diagrams [share same data][part] :
- associations
- attributes
- classes
- keys
- legend
- relations
Hence, if you add something in your shared sources, all diagrams will get it !
[Talk is cheap. Show me the code.][show]
----------------------------------------
| _Diagram type_ | Single file | Shared files |
|:---: |:---: |:---:|
|_Functional domain_ | - | ([diagram][fm-shared]) - [[source][fm-shared-src]] - [common parts][part] |
|_Functional domain detailed_ | ([diagram][fmwa-single]) - [[source][fmwa-single-src]] | ([diagram][fmwa-shared]) - [[source][fmwa-shared-src]] - [common parts][part] |
|_Physical data model_ | ([diagram][pdm-single]) - [[source][pdm-single-src]] | ([diagram][pdm-shared]) - [[source][pdm-shared-src]] - [common parts][part] |
[dry]: https://en.wikipedia.org/wiki/Don't_repeat_yourself "Don't repeat yourself"
[fm-shared]: https://free_zed.gitlab.io/mypumlt/diagrams/fm-shared_files.png "Functional model with shared files"
[fm-shared-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/fm-shared_files.puml "Diagram sources"
[fmwa-single]: https://free_zed.gitlab.io/mypumlt/diagrams/fmwa-single_file.png "Functional model (with attributes) single file"
[fmwa-single-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/fmwa-single_file.puml "Diagram sources"
[fmwa-shared]: https://free_zed.gitlab.io/mypumlt/diagrams/fmwa-shared_files.png "Functional model (with attributes) with shared files"
[fmwa-shared-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/fmwa-shared_files.puml "Diagram sources"
[part]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/part "Diagram parts sources"
[pdm-shared]: https://free_zed.gitlab.io/mypumlt/diagrams/pdm-shared_files.png "Physical data model with shared files"
[pdm-shared-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/pdm-shared_files.puml "Diagram sources"
[pdm-single]: https://free_zed.gitlab.io/mypumlt/diagrams/pdm-single_file.png "Physical data model single file"
[pdm-single-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/pdm-single_file.puml "Diagram sources"
[plantuml]: http://plantuml.com "Open-source tool to draw UML (or not) diagrams"
[preprocessor]: http://plantuml.com/en/preprocessing#9 "Preprocessing"
[show]: https://lkml.org/lkml/2000/8/25/132
[src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/ "Diagram sources"
[yml]: https://gitlab.com/free_zed/mypumlt/blob/master/.gitlab-ci.yml

View File

@ -0,0 +1,74 @@
Title: Génération de diagrammes PlantUML avec Gitlab-CI
Date: 2019-07-13 10:00
Summary: Générer des diagrammes PlantUML à l'aide de l'intégration continue & l'hébergement statique de Gitlab
Category: Bloc-notes
Tags: uml, gitlab-ci, gitlab-pages, statique, ci, dry, devops, web, digitalisation
Status: Published
Lang: fr
Slug: plantuml-gitlab_ci-diagramme-generation
_Le moyen le plus simple de garder les diagrammes à jour avec le code_
C'est quoi ?
------
Les diagrammes sont :
* décrits **100%** par du texte
* générés avec _gitlab-ci_
* déployés sur _gitlab-pages_
Tellement facile à maintenir que vos diagrammes _pourraient_ être encore à jour même **10 mois après le démarrage du projet**!!!
Mais comment ?
-----
Poussez simplement [les sources des diagrammes][src] et [.gitlab-ci.yml][yml] se chargera de la génération des images & de la mise en ligne via _pages_ :
![Modèle physique de donnée avec fichiers partagés][pdm-shared].
[D.R.Y.][dry] !
---------------
L'utilisation de directives du _[préprocesseur PlantUML][preprocessor]_ telles que _!include_ ou _!includeurl_ permet de partager des sources communes entre les diagrammes.
Dans mon [exemple][repo], les diagrammes marqués _shared files_ [partagent les mêmes entitiés][part] :
- associations
- attributs
- classes
- clés
- légende
- relations
Par conséquent, si vous ajoutez quelque chose dans vos _sources partagées_, tous les diagrammes l'obtiendront !
_«[Talk is cheap. Show me the code.][show]»_
------------------------------------------
| _Type de diagramme_ | Fichier seul | Fichiers partagés |
|:---: |:---: |:---:|
|_Domaine fonctionnel_ | - | ([diagramme][fm-shared]) - [[source][fm-shared-src]] - [éléments communs][part] |
|_Domaine fonctionnel complet_ | ([diagramme][fmwa-single]) - [[source][fmwa-single-src]] | ([diagramme][fmwa-shared]) - [[source][fmwa-shared-src]] - [éléments communs][part] |
|_Modèle physique de donnée_ | ([diagramme][pdm-single]) - [[source][pdm-single-src]] | ([diagramme][pdm-shared]) - [[source][pdm-shared-src]] - [éléments communs][part] |
[dry]: https://en.wikipedia.org/wiki/Don't_repeat_yourself "Don't repeat yourself"
[fm-shared]: https://free_zed.gitlab.io/mypumlt/diagrams/fm-shared_files.png "Domaine fonctionnel avec fichiers partagés"
[fm-shared-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/fm-shared_files.puml "Sources du diagramme"
[fmwa-single]: https://free_zed.gitlab.io/mypumlt/diagrams/fmwa-single_file.png "Domaine fonctionnel (avec attributs) single file"
[fmwa-single-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/fmwa-single_file.puml "Sources du diagramme"
[fmwa-shared]: https://free_zed.gitlab.io/mypumlt/diagrams/fmwa-shared_files.png "Domaine fonctionnel (avec attributs) avec fichiers partagés"
[fmwa-shared-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/fmwa-shared_files.puml "Sources du diagramme"
[part]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/part "Sources partagées"
[pdm-shared]: https://free_zed.gitlab.io/mypumlt/diagrams/pdm-shared_files.png "Modèle physique de donnée avec fichiers partagés"
[pdm-shared-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/pdm-shared_files.puml "Sources du diagramme"
[pdm-single]: https://free_zed.gitlab.io/mypumlt/diagrams/pdm-single_file.png "Modèle physique de donnée single file"
[pdm-single-src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/pdm-single_file.puml "Sources du diagramme"
[plantuml]: http://plantuml.com "Open-source tool to draw UML (or not) diagrams"
[preprocessor]: http://plantuml.com/en/preprocessing#9 "Preprocessing"
[repo]: https://gitlab.com/free_zed/mypumlt
[show]: https://lkml.org/lkml/2000/8/25/132
[src]: https://gitlab.com/free_zed/mypumlt/blob/master/puml/ "Sources du diagramme"
[yml]: https://gitlab.com/free_zed/mypumlt/blob/master/.gitlab-ci.yml