diff --git a/gitlab.md b/gitlab.md new file mode 100644 index 0000000000000000000000000000000000000000..23603ff7950f8e9f5ccab99a9885042849b7a060 --- /dev/null +++ b/gitlab.md @@ -0,0 +1,219 @@ +--- +author: marc +title: Gitlab +date: 9 novembre 2019 +--- + + +# Les remotes + +--- + +## Git est distribué + +{ width=40% } + +::: notes +On dit que git est distribué +Cela veut dire que n'importe quel ordinateur va généralement héberger l'entièreté du repos +et de la liste des versions + +cela veut aussi dire que l'on peut se connecter à n'importe quel autre ordinateur contenant +ce repos pour se mettre à jour + +on va avoir un serveur mais il est "un ordinateur parmis d'autres" +::: + +--- + +## Paramétrage + +- aller sur [https://gitlab.clubelek.fr](https://gitlab.clubelek.fr) +- se connecter avec son compte clubelek +- enregistrer un mot de passe + +--- + +## Gestion des remotes + +```bash +# initialisation +mkdir example-remote +cd example-remote +git init + +# lister les remote +git remote -v + +# ajouter un remote (en une seule ligne) +git remote add origin https://gitlab.clubelek.fr/formations +/software-engineering/example-remote.git + +git remote -v +``` + +--- + +## Synchronisation + +```bash +# télécharger les modifications +git pull + +# uploader des modifications +git push <nom remote> <nom branche> +``` + +--- + +## Forges logicielles + +{ width=30% } + +- hébergement de répertoires +- fonctionnalités de gestion de projet + +::: notes +Les forges logicielles permettent de gérer des répertoires versionnés, mais ont en plus des outils supplémentaires de gestion de projet +::: + + +# Fonctionnalités + +--- + +## Issues + +Pour faire des propositions théoriques + +- améliorations +- questions +- bugs + +Permet de lister les tâches pour les dévellopeurs + +--- + + + +::: notes +Les issues vont être utile pour tracker l'avancement d'un projet et les tâches +::: + +--- + +[https://gitlab.clubelek.fr/formations/software-engineering/example-remote/issues](https://gitlab.clubelek.fr/formations/software-engineering/example-remote/issues) + +**Pratique** : ajouter une issue + +--- + +## Merge requests (MR) + +Pour proposer des modificatinos de code + +En pratique, on va toujours utiliser des merge requests quand on modifie le code ! + +--- + + + +--- + +**Pratique** : + +1. créer une nouvelle branche `votre_nom/rabbit` +2. créer un nouveau commit +3. `git push <nom remote> <nom branche>` + +Qu'est-ce qui s'affiche ? + +. . . + +Un lien pour créer la MR créé par gitlab. + +Il est également possible d'en créer depuis l'interface + +--- + +## Discussion + +Pour les issues et les merge requests, une interface de discussion est disponible + +- pertinence ou manière d'implémenter une issue +- review de code + +## Labels + +Catégorisation des issues et des Merge requests + +--- + +Type : + + + +--- + +Statut : + + + +--- + +Priorité : + + + +--- + +## Milestones + +Permet de définir des échances + +- versions +- réunions/présentations + + + +--- + +## Workflow: dévellopeur + +1. Implémentation en local sur une branche à part +2. `git push <remote> <nom_branche>` +3. Création d'une merge request + +--- + +## Workflow: mainteneur + +0. Regarder régulièrement les repos qu'il maintient +1. Assigner des labels aux issues et aux merge request +2. Définir quelles issues vont faire partie des milestones +3. Faire une revue du code proposé dans chaque merge request +4. Fusionner le code s'il le trouve convenable +5. Fermer les issues associées + + + +# TL;DR + +--- + +```bash +git remote add <nom> <url> #ajouter un remote +git remote -v #lister les remote +git push # mettre en ligne des modifications +git pull # mettre à jour le dossier local +``` + +- **issues** : propositions +- **merge requests** : implémentations +- **milestones** : échéances +- **labels** : catégorisation des issues/MR + +--- + +Une ressource utile : +[https://git-scm.com/book](https://git-scm.com/book) diff --git a/makefile b/makefile index 933d18f3d4b7c85272c060653d1ab620c58f114b..676076f3b36fc4e7b3f29b66b852144bfe07d04f 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,6 @@ version=3.8.0 src=$(wildcard *.md) -html=$(join public/, $(src:.md=.html)) +html=$(patsubst %.md,public/%.html,${src}) theme=solarized all: ${html} images copy-patched-css diff --git a/public/images/git/mr.png b/public/images/git/mr.png new file mode 100644 index 0000000000000000000000000000000000000000..1bae71307aa4911f58a93747a391cc6ebdc40b9c --- /dev/null +++ b/public/images/git/mr.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffd07d76f0025da1432c232902d14f13b36365bec7643dce776135f9af83ffb9 +size 62190 diff --git a/public/images/gitlab/distributed_git.png b/public/images/gitlab/distributed_git.png new file mode 100644 index 0000000000000000000000000000000000000000..51561bece3525b7c7a93d42d6ea92df7324eb75b --- /dev/null +++ b/public/images/gitlab/distributed_git.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4243fe738a0d11e825174c4fd1b37306001552b2ca451b6ded90a3dbcbe4c42d +size 70752 diff --git a/public/images/gitlab/issues.png b/public/images/gitlab/issues.png new file mode 100644 index 0000000000000000000000000000000000000000..07c3706da41540c8d0b105311021686f51b2dcd1 --- /dev/null +++ b/public/images/gitlab/issues.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0949ebde50572efec9d16cb31cd751df576ef37b756892c1cdcb4d275903890 +size 140801 diff --git a/public/images/gitlab/label_priority.png b/public/images/gitlab/label_priority.png new file mode 100644 index 0000000000000000000000000000000000000000..9a99e678da4884a7dfa9805a612a4b8fd074ba0a --- /dev/null +++ b/public/images/gitlab/label_priority.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:244fde2f1cd89da75e6a22736fd5051469abcf94571976e68b5e074584a36b98 +size 5590 diff --git a/public/images/gitlab/label_status.png b/public/images/gitlab/label_status.png new file mode 100644 index 0000000000000000000000000000000000000000..a47974b96f805c040a570cc100c30a485b3a057d --- /dev/null +++ b/public/images/gitlab/label_status.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5587727a88abc87916253b184b5921f3ec00c897a76e353141f2758822d0a6c9 +size 15270 diff --git a/public/images/gitlab/label_type.png b/public/images/gitlab/label_type.png new file mode 100644 index 0000000000000000000000000000000000000000..3f4aa95684796ac90c5993e2b4574f4e3c14e16a --- /dev/null +++ b/public/images/gitlab/label_type.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0444874281da0a0c376a9d91b2319ac576211a6283c893716c8bbcbe926f01c9 +size 7024 diff --git a/public/images/gitlab/logos_forge.png b/public/images/gitlab/logos_forge.png new file mode 100644 index 0000000000000000000000000000000000000000..3c776cf0f1a959c7af5aa6f5b97bb3caec7c6db8 --- /dev/null +++ b/public/images/gitlab/logos_forge.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5213e3ffd15c404c936d66288713e1f9dec4b455620fa14f527f87074079f1d7 +size 32284 diff --git a/public/images/gitlab/logos_forge.svg b/public/images/gitlab/logos_forge.svg new file mode 100644 index 0000000000000000000000000000000000000000..8b9238a1430607d1ac353b09c1841352de2e7ac2 --- /dev/null +++ b/public/images/gitlab/logos_forge.svg @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="210mm" + height="297mm" + viewBox="0 0 210 297" + version="1.1" + id="svg8" + inkscape:version="0.92.4 5da689c313, 2019-01-14" + sodipodi:docname="logos_forge.svg"> + <defs + id="defs2" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.35" + inkscape:cx="342.85714" + inkscape:cy="680" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1920" + inkscape:window-height="1080" + inkscape:window-x="1280" + inkscape:window-y="1080" + inkscape:window-maximized="0" /> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Calque 1" + inkscape:groupmode="layer" + id="layer1"> + <g + sketch:type="MSPage" + id="Page-1" + transform="matrix(0.26458333,0,0,0.26458333,100.43929,131.19385)" + style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"> + <g + sketch:type="MSLayerGroup" + id="Fill-1-+-Group-24"> + <g + sketch:type="MSShapeGroup" + id="Group-24"> + <g + id="Group"> + <path + id="Fill-4" + d="m 105.0614,193.655 v 0 l 38.64,-118.921 h -77.28 z" + inkscape:connector-curvature="0" + style="fill:#e24329" /> + <path + id="Fill-6" + d="" + inkscape:connector-curvature="0" + style="fill:#fc6d26" /> + <path + id="Fill-8" + d="M 105.0614,193.6548 66.4214,74.7338 H 12.2684 Z" + inkscape:connector-curvature="0" + style="fill:#fc6d26" /> + <path + id="Fill-10" + d="" + inkscape:connector-curvature="0" + style="fill:#fc6d26" /> + <path + id="Fill-12" + d="m 12.2685,74.7341 v 0 l -11.742,36.139 c -1.071,3.296 0.102,6.907 2.906,8.944 l 101.629,73.838 z" + inkscape:connector-curvature="0" + style="fill:#fca326" /> + <path + id="Fill-14" + d="" + inkscape:connector-curvature="0" + style="fill:#fc6d26" /> + <path + id="Fill-16" + d="m 12.2685,74.7342 h 54.153 L 43.1485,3.1092 c -1.197,-3.686 -6.411,-3.685 -7.608,0 z" + inkscape:connector-curvature="0" + style="fill:#e24329" /> + <path + id="Fill-18" + d="m 105.0614,193.6548 38.64,-118.921 h 54.153 z" + inkscape:connector-curvature="0" + style="fill:#fc6d26" /> + <path + id="Fill-20" + d="m 197.8544,74.7341 v 0 l 11.742,36.139 c 1.071,3.296 -0.102,6.907 -2.906,8.944 l -101.629,73.838 z" + inkscape:connector-curvature="0" + style="fill:#fca326" /> + <path + id="Fill-22" + d="m 197.8544,74.7342 h -54.153 l 23.273,-71.625 c 1.197,-3.686 6.411,-3.685 7.608,0 z" + inkscape:connector-curvature="0" + style="fill:#e24329" /> + </g> + </g> + </g> + </g> + <g + style="fill:none" + id="g994" + transform="matrix(0.05355551,0,0,0.05355551,11.613975,155.97335)"> + <path + id="path983" + transform="scale(64)" + d="M 8,0 C 3.58,0 0,3.58 0,8 c 0,3.54 2.29,6.53 5.47,7.59 0.4,0.07 0.55,-0.17 0.55,-0.38 0,-0.19 -0.01,-0.82 -0.01,-1.49 C 4,14.09 3.48,13.23 3.32,12.78 3.23,12.55 2.84,11.84 2.5,11.65 2.22,11.5 1.82,11.13 2.49,11.12 3.12,11.11 3.57,11.7 3.72,11.94 4.44,13.15 5.59,12.81 6.05,12.6 6.12,12.08 6.33,11.73 6.56,11.53 4.78,11.33 2.92,10.64 2.92,7.58 2.92,6.71 3.23,5.99 3.74,5.43 3.66,5.23 3.38,4.41 3.82,3.31 c 0,0 0.67,-0.21 2.2,0.82 0.64,-0.18 1.32,-0.27 2,-0.27 0.68,0 1.36,0.09 2,0.27 1.53,-1.04 2.2,-0.82 2.2,-0.82 0.44,1.1 0.16,1.92 0.08,2.12 0.51,0.56 0.82,1.27 0.82,2.15 0,3.07 -1.87,3.75 -3.65,3.95 0.29,0.25 0.54,0.73 0.54,1.48 0,1.07 -0.01,1.93 -0.01,2.2 0,0.21 0.15,0.46 0.55,0.38 C 13.71,14.53 16,11.53 16,8 16,3.58 12.42,0 8,0 Z" + inkscape:connector-curvature="0" + style="clip-rule:evenodd;fill:#1b1f23;fill-rule:evenodd" /> + </g> + <g + id="g1086" + transform="matrix(0.55155873,0,0,0.55155873,20.528178,54.753543)"> + <g + style="display:inline" + transform="translate(0,-161.53334)" + id="layer1-3" + inkscape:label="Layer 1"> + <path + sodipodi:nodetypes="sscccccsccsc" + inkscape:connector-curvature="0" + id="path3722" + d="m 27.709937,195.15095 c -9.546573,-0.0272 -22.3392732,6.79805 -21.6317552,23.90397 1.105534,26.72889 25.4565952,29.20839 35.1916502,29.42301 1.068023,5.01357 12.521798,22.30563 21.001818,23.21667 h 37.15277 c 22.27763,-1.66785 38.9607,-75.75671 26.59321,-76.03825 -46.781583,2.47691 -49.995146,2.13838 -88.599758,0 -2.495053,-0.0266 -5.972321,-0.49474 -9.707935,-0.5054 z m 2.491319,9.45886 c 1.351378,13.69267 3.555849,21.70359 8.018216,33.94345 -11.382872,-1.50473 -21.069822,-5.22443 -22.851515,-19.10984 -0.950962,-7.4112 2.390428,-15.16769 14.833299,-14.83361 z" + style="fill:#609926;fill-opacity:1;stroke:#428f29;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + </g> + <g + style="display:inline" + inkscape:label="Layer 2" + id="layer2"> + <rect + ry="5.4825778" + transform="rotate(25.914715)" + y="18.291576" + x="87.508659" + height="34.762054" + width="34.762054" + id="rect4599" + style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.24757317;stroke-opacity:1" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path4525" + d="m 79.804947,57.359056 3.241146,1.609954 V 35.255731 h -3.262698 z" + style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26644793px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <g + style="display:inline" + inkscape:label="Layer 3" + id="layer3"> + <g + id="g4539" + style="display:inline"> + <circle + style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" + id="path4606" + cx="49.064713" + cy="90.077766" + r="3.4745038" + transform="rotate(-19.796137)" /> + <circle + style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" + id="path4606-3" + cx="36.810425" + cy="102.1049" + r="3.4745038" + transform="rotate(-19.796137)" /> + <circle + style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" + id="path4606-1" + cx="46.484283" + cy="111.43928" + r="3.4745038" + transform="rotate(-19.796137)" /> + <rect + style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.27444693;stroke-opacity:1" + id="rect4629-8" + width="2.6726954" + height="27.261492" + x="97.333458" + y="18.061695" + transform="rotate(26.024158)" /> + <path + style="fill:none;stroke:#609926;stroke-width:2.68000007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 76.558096,68.116343 c 12.97589,6.395378 13.012989,4.101862 4.890858,20.907244" + id="path4514" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> + </g> + </g> + </g> +</svg> diff --git a/public/images/gitlab/makefile b/public/images/gitlab/makefile new file mode 100644 index 0000000000000000000000000000000000000000..58b1f4be5b5e0defb557f7fbfb7a99cac833e585 --- /dev/null +++ b/public/images/gitlab/makefile @@ -0,0 +1,13 @@ +SOURCES= $(wildcard *.svg) +TARGETS= $(SOURCES:.svg=.png) + +all: ${TARGETS} + +%.png: %.svg + inkscape --export-area-drawing --export-png=$@ $^ + +.PHONY: clean + +clean: + rm -rf ${TARGETS} + diff --git a/public/images/gitlab/milestones.png b/public/images/gitlab/milestones.png new file mode 100644 index 0000000000000000000000000000000000000000..ce9b269655b47a75c4305f42366bc5d8924df52f --- /dev/null +++ b/public/images/gitlab/milestones.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09c75c525d4f462b1ad9b2f98bf9f68b6a894dc18637dff97e113b4c74063949 +size 37106 diff --git a/public/images/gitlab/mr.png b/public/images/gitlab/mr.png new file mode 100644 index 0000000000000000000000000000000000000000..1bae71307aa4911f58a93747a391cc6ebdc40b9c --- /dev/null +++ b/public/images/gitlab/mr.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffd07d76f0025da1432c232902d14f13b36365bec7643dce776135f9af83ffb9 +size 62190 diff --git a/public/images/makefile b/public/images/makefile index d69c6738b7fa8472b102cf556a86a02cc08d86cd..9b0cb6844b2f9a22f7f4030a4b96831599b9ac49 100644 --- a/public/images/makefile +++ b/public/images/makefile @@ -1,10 +1,13 @@ -all: git +all: git gitlab -.PHONY: git +.PHONY: git gitlab git: $(MAKE) -C git +gitlab: + $(MAKE) -C gitlab + .PHONY: clean clean: