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/11 18:40]
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) ​   * [[https://​val.bmstu.ru/​unix/​Git/​gitlab-runner_amd64.deb]] (15.0.0) ​
  
Line 37: Line 40:
 ==== GitLab CI/CD ==== ==== GitLab CI/CD ====
  
-  * [[https://​docs.gitlab.com/​ee/​ci/​examples/​|GitLab ​CI/CD Examples]]+  * [[https://​docs.gitlab.com/​ee/​ci/​examples/​#​cicd-templates|CI/​CD ​templates]]
  
 <​code>​ <​code>​
-vagrant@node1:~/project1$ cat .gitlab-ci.yml +student@gate:~/dhcp$ cat .gitlab-ci.yml 
-before_script+</​code><​code>​ 
-  - echo "Before script section" >> /​tmp/​Bash.gitlab-ci.log+test1
 +  ​stage: test 
 +  script: 
 +    ​- echo $(date) ​"Do test dhcpd" >> /​tmp/​Bash.gitlab-ci.log 
 +    - make test 
 +  tags: 
 +    - dhcptest
  
-after_script+deploy1
-  - echo "After script ​section" >> /​tmp/​Bash.gitlab-ci.log+  ​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: deploy1:
   stage: deploy   stage: deploy
   script:   script:
-    - echo "Do your deploy here" >> /​tmp/​Bash.gitlab-ci.log+    - echo $(date) ​"Do your deploy here" >> /​tmp/​Bash.gitlab-ci.log
     - docker-compose up -d     - docker-compose up -d
 +  tags:
 +    - webddeploy
 </​code>​ </​code>​
  
инструмент_gitlab.txt · Last modified: 2024/06/13 08:39 by val