-- Leo's gemini proxy

-- Connecting to gmi.osiux.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=es_AR

Graficar ejemplo completo de integrar GitFlow y GitLab MRs


AUTHOR: Osiris Alejandro Gomez

EMAIL: osiux@osiux.com

DATE: 2023-05-12 09:30


#+ATTR_HTML: :title Git Flow Full Example with branch develop, master, support 0.1x, support 0.2.x and four tags include GitLab Pipeline Status, Ready and Approve MR for branchs feature, hotfix and release

[IMG]

[1]


Hace 10 años que uso `git flow` ^1[2] en `gcoop` ^2[3] y hace 2 años que en un proyecto grande lo usamos conjuntamente con el circuito de `MRs` ^3[4] de `GitLab` ^4[5] para clarificar un poco todo el proceso decidí utilizar `GraphViz`


En el diagrama de ejemplo se plantean 2 *features* (`foo` y `bar`), cada uno es para un *release* en particular (`v0.1.0` y `v0.2.0`) y posterior a cada *release* se generan 2 *hotfix* (`v0.1.1` y `v0.2.2`).


El `código del grafo` ^5[6] esta disponible en el *repo* `osiux-graphviz` ^6[7]


El flujo de desarrollo es idéntico tanto para `feature`, `release` y `hotfix`, es decir, todos los *branchs* requieren los siguientes pasos:


1. Crear *branch* e inmediatamente, crear *MR* en *Draft*

2. Desarrollar *feature*, *release* y/o *hotfix*

3. Verificar *Pipeline Success* de *GitLab* (caso contrario volver a 2)

4. Si el desarrollo esta listo, marcar *Ready*

5. Revisar *MR* y Aprobar solo si hay *PS* (caso contrario volver a 2)

6. Si se completaron todos los pasos anteriores, realizar *merge*


┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┐
│ *type*  │ *tag/br │ *Create │  *PS*   │ *Ready* │ *Review │ *Approv │ *Merge │
│         │  anch*  │   MR*   │         │         │   MR*   │   e*    │   *    │
╞═════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╪════════╡
│         │ `v0.1.0 │         │         │         │         │         │        │
│ *Tag Re │ ,       │         │ *GitLab │         │         │         │        │
│ leases* │ v0.2.0, │ *N/A*   │ *       │ *N/A*   │ *N/A*   │ *N/A*   │ *N/A*  │
│         │ v0.1.1, │         │         │         │         │         │        │
│         │ v0.2.2` │         │         │         │         │         │        │
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│         │ `master │         │         │         │         │         │        │
│ *Stable │ , suppo │         │         │         │         │         │        │
│ Release │ rt/0.1. │ *N/A*   │ *GitLab │ *N/A*   │ *N/A*   │ *N/A*   │ *N/A*  │
│ s*      │ x, supp │         │ *       │         │         │         │        │
│         │ ort/0.2 │         │         │         │         │         │        │
│         │ .x`     │         │         │         │         │         │        │
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│         │ `releas │         │         │         │         │         │        │
│ *Releas │ e/0.1.0 │ *Develo │ *GitLab │ *Develo │ *Mantai │ *Mantai │ *Manta │
│ e Branc │ , relea │ per*    │ *       │ per*    │ ner*    │ ner*    │ iner*  │
│ hs*     │ se/0.2. │         │         │         │         │         │        │
│         │ 0`      │         │         │         │         │         │        │
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│ *Hotfix │ `hotfix │         │         │         │         │         │        │
│ Branchs │ /0.1.1, │ *Develo │ *GitLab │ *Develo │ *Mantai │ *Mantai │ *Manta │
│ *       │ hotfix/ │ per*    │ *       │ per*    │ ner*    │ ner*    │ iner*  │
│         │ 0.2.2`  │         │         │         │         │         │        │
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│ *Featur │ `featur │         │         │         │         │         │        │
│ e Branc │ e/foo,  │ *Develo │ *GitLab │ *Develo │ *Mantai │ *Mantai │ *Manta │
│ hs*     │ feature │ per*    │ *       │ per*    │ ner*    │ ner*    │ iner*  │
│         │ /bar`   │         │         │         │         │         │        │
└─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┘

*feature*, *release* y *tag*


☐ crear *issue* en `project#123`

☐ crear *branch* `feature/foo` saliendo de `develop` en el *repo* que corresponda

☐ crear *MR* `Draf: Resolve feature/foo "Issue Tittle"` con `Closes project#123`

☐ *branch* `feature/foo` debe tener *MR* con *PS*

☐ crear documentación en *wiki* `foo/foo_bar_vM.N.P`

☐ *branch* `release/M.N.P` debe tener *PS*

☐ *tag* `vM.N.P`


*hotfix*


☐ crear *branch* `support/M.N.x` saliedo de *tag* `vM.M.x`

☐ crear *branch* `hotfix/foobar` saliendo de `support/M.N.x`

☐ *branch* `hotfix/foobar` debe tener *MR* con *PS*


Referencias


┌─────────┬─────────────────────┐
│  item   │     descripción     │
╞═════════╪═════════════════════╡
│ *MR*    │ *Merge Request*     │
├─────────┼─────────────────────┤
│ *PS*    │ *Pipeline Success*  │
├─────────┼─────────────────────┤
│ `M.N.P` │ `MAJOR.MINOR.PATCH` │
└─────────┴─────────────────────┘

Tal vez te interese leer


Automate conversion of blog from *org-mode* to *Html*, *Markdown* and *Gemini* using *Docker image* `alpine-org2blog` and *GitLab CI*[8]

howto launch gitlab ci from other gitlab ci repo using trigger[9]

Automatizar la implementación de los recursos de AWX con GitLab CI/CD y Ansible Tools[10]

cómo usar *GitLab* desde la línea de comandos[11]


ChangeLog


`2023-05-12 10:40`[12] agregar *Graficar ejemplo completo de integrar GitFlow y GitLab MRs*


1: file:img/git-flow-full.png

2: https://nvie.com/posts/a-successful-git-branching-model/

3: https://www.gcoop.coop/

4: https://docs.gitlab.com/ee/user/project/merge_requests/

5: https://docs.gitlab.com/omnibus/installation/

6: https://gitlab.com/osiux/osiux-graphviz/-/raw/develop/dot/git-flow-full.dot

7: https://gitlab.com/osiux/osiux-graphviz/

8: 2023-02-24-automate-blog-from-org-mode-to-html-markdown-gemini-using-docker-alpine-org2blog-and-gitlab-ci.gmi

9: 2023-02-14-howto-launch-gitlab-ci-from-other-gitlab-ci-repo-using-trigger.gmi

10: 2022-10-08-automate-deployment-of-AWX-resources-with-GitLab-CI-CD-and-ansible-tools.gmi

11: 2022-08-21-howto-use-gitlab-from-command-line.gmi

12: https://gitlab.com/osiux/osiux.gitlab.io/-/commit/7b750e2424e400fd1a78e5a5e95095ba39d8fa87

-- Response ended

-- Page fetched on Thu May 2 11:56:05 2024