This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_git [2022/08/14 18:18] val [Использование персонального http/ssh/git репозитория] |
сервис_git [2022/08/16 15:32] val [Пример с тестовой веткой] |
||
---|---|---|---|
Line 87: | Line 87: | ||
server#:/var/www/html/conf.git# git init --bare | server#:/var/www/html/conf.git# git init --bare | ||
- | Не обязательно, но, если хочется видеть содержимое текущего репозитория по http, можно настроить hooks/post-update !!! exec должна быть последняя команда | + | Не обязательно, но, если хочется видеть содержимое текущего репозитория по http, можно настроить hooks/post-update |
server#:/var/www/html/conf.git# mv hooks/post-update.sample hooks/post-update | server#:/var/www/html/conf.git# mv hooks/post-update.sample hooks/post-update | ||
Line 94: | Line 94: | ||
server#:/var/www/html/conf.git# cat hooks/post-update | server#:/var/www/html/conf.git# cat hooks/post-update | ||
- | </code><code> | + | </code> |
+ | !!! exec должна быть последняя команда | ||
+ | <code> | ||
... | ... | ||
#exec git update-server-info | #exec git update-server-info | ||
Line 158: | Line 160: | ||
==== On-Premise gitlab ==== | ==== On-Premise gitlab ==== | ||
<code> | <code> | ||
- | $ git clone http://server.corp14.un/student/dhcp.git | + | # git clone http://server.corpX.un/student/dhcp.git |
или | или | ||
Line 196: | Line 198: | ||
==== Пример с тестовой веткой ==== | ==== Пример с тестовой веткой ==== | ||
<code> | <code> | ||
- | $ git branch test | + | λ git branch test |
- | $ git branch -a | + | λ git branch -a |
- | $ git checkout test | + | λ git checkout test |
... edit ... commit ... | ... edit ... commit ... | ||
- | $ git push -u origin test | + | λ git push -u origin test |
+ | |||
+ | root@server:~/openvpn1# git pull origin test | ||
+ | root@server:~/openvpn1# ansible-playbook ... test_nodes | ||
+ | или | ||
... ci/cd test ... | ... ci/cd test ... | ||
- | $ git checkout main | ||
- | $ git push -u origin main | + | λ git checkout main |
+ | |||
+ | λ git merge test | ||
+ | |||
+ | λ git push -u origin main | ||
... ci/cd prod ... | ... ci/cd prod ... |