User Tools

Site Tools


инструмент_gitlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
инструмент_gitlab [2022/06/08 16:09]
val [GitLab Runner]
инструмент_gitlab [2022/06/20 09:00]
val [GitLab CI/CD]
Line 20: Line 20:
  
   * [[https://​docs.gitlab.com/​runner/​install/​linux-manually.html|Install GitLab Runner manually on GNU/Linux]]   * [[https://​docs.gitlab.com/​runner/​install/​linux-manually.html|Install GitLab Runner manually on GNU/Linux]]
 +
 +  * [[https://​medium.com/​@ryzmen/​gitlab-fast-pipelines-stages-jobs-c51c829b9aa1|GitLab:​ understanding pipelines, stages, jobs and organising them efficiently for speed and feedback loop]]
 +
 +  * [[https://​val.bmstu.ru/​unix/​Git/​gitlab-runner_amd64.deb]] (15.0.0) ​
  
 <​code>​ <​code>​
Line 28: Line 32:
 log_level = "​debug"​ log_level = "​debug"​
 ... ...
- 
-root@node2:​~#​ mkdir /​var/​lib/​gitlab-runner 
- 
-root@node2:​~#​ chown gitlab-runner /​var/​lib/​gitlab-runner 
 </​code>​ </​code>​
   * Технология Docker [[Технология Docker#​Предоставление прав непривилегированным пользователям]]   * Технология Docker [[Технология Docker#​Предоставление прав непривилегированным пользователям]]
Line 37: Line 37:
 root@node2:​~#​ systemctl start gitlab-runner root@node2:​~#​ systemctl start gitlab-runner
 </​code>​ </​code>​
 +
 +==== GitLab CI/CD ====
 +
 +  * [[https://​docs.gitlab.com/​ee/​ci/​examples/#​cicd-templates|CI/​CD templates]]
 +
 +<​code>​
 +student@gate:​~/​dhcp$ cat .gitlab-ci.yml
 +</​code><​code>​
 +test1:
 +  stage: test
 +  script:
 +    - echo $(date) "Do test dhcpd" >> /​tmp/​Bash.gitlab-ci.log
 +    - make test
 +  tags:
 +    - dhcptest
 +
 +deploy1:
 +  stage: deploy
 +  script:
 +    - echo $(date) "Do deploy dhcpd" >> /​tmp/​Bash.gitlab-ci.log
 +    - sudo make install
 +  tags:
 +    - dhcpdeploy
 +
 +</​code><​code>​
 +vagrant@node1:​~/​project1$ cat .gitlab-ci.yml
 +</​code><​code>​
 +test1:
 +  stage: test
 +  script:
 +    - echo $(date) "Do a test here" >> /​tmp/​Bash.gitlab-ci.log
 +    - shellcheck webd/webd
 +  tags:
 +    - shellcheck
 +
 +deploy1:
 +  stage: deploy
 +  script:
 +    - echo $(date) "Do your deploy here" >> /​tmp/​Bash.gitlab-ci.log
 +    - docker-compose up -d
 +  tags:
 +    - webddeploy
 +</​code>​
 +
 ==== Управление пользователями ==== ==== Управление пользователями ====
  
инструмент_gitlab.txt · Last modified: 2024/06/13 08:39 by val