инструмент_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/20 09:00]
val [GitLab CI/CD]
инструмент_gitlab [2022/06/26 15:46]
val [Установка]
Line 8: Line 8:
   * [[https://​about.gitlab.com/​install/​|Install self-managed GitLab]]   * [[https://​about.gitlab.com/​install/​|Install self-managed GitLab]]
   * Доступно из РФ: [[https://​packages.gitlab.com/​gitlab/​gitlab-ce]]   * Доступно из РФ: [[https://​packages.gitlab.com/​gitlab/​gitlab-ce]]
 +
 +<​code>​
 +# cat /​etc/​gitlab/​initial_root_password
 +</​code>​
  
   * [[https://​www.techbeatly.com/​configure-custom-ssl-to-secure-gitlab-server/​|Configure Custom SSL to Secure GitLab Server]]   * [[https://​www.techbeatly.com/​configure-custom-ssl-to-secure-gitlab-server/​|Configure Custom SSL to Secure GitLab Server]]
Line 41: Line 45:
  
   * [[https://​docs.gitlab.com/​ee/​ci/​examples/#​cicd-templates|CI/​CD templates]]   * [[https://​docs.gitlab.com/​ee/​ci/​examples/#​cicd-templates|CI/​CD templates]]
 +
 +=== Пример 1 ===
  
 <​code>​ <​code>​
Line 61: Line 67:
     - dhcpdeploy     - dhcpdeploy
  
 +</​code>​
 +
 +=== Пример 2 ===
 +
 +<​code>​
 +root@server:​~/​openvpn1#​ cat .gitlab-ci.yml
 </​code><​code>​ </​code><​code>​
 +deploy_test:​
 +  stage: deploy
 +  script:
 +    - echo $(date) "​Deploy TEST openvpn1"​ >> /​tmp/​Bash.gitlab-ci.log
 +    - ansible-playbook openvpn1.yaml -i inventory.yaml -e "​variable_host=test_nodes"​
 +  tags:
 +    - openvpn1deploy
 +  rules:
 +    - if: ($CI_COMMIT_BRANCH == "​test"​ && $CI_COMMIT_REF_NAME == "​test"​)
 +
 +deploy_prod:​
 +  stage: deploy
 +  script:
 +    - echo $(date) "​Deploy PROD openvpn1"​ >> /​tmp/​Bash.gitlab-ci.log
 +    - ansible-playbook openvpn1.yaml -i inventory.yaml
 +  tags:
 +    - openvpn1deploy
 +  rules:
 +    - if: ($CI_COMMIT_BRANCH == "​main"​ && $CI_COMMIT_REF_NAME == "​main"​)
 +</​code>​
 +
 +=== Пример 3 ===
 +
 +<​code>​
 vagrant@node1:​~/​project1$ cat .gitlab-ci.yml vagrant@node1:​~/​project1$ cat .gitlab-ci.yml
 </​code><​code>​ </​code><​code>​
инструмент_gitlab.txt · Last modified: 2024/05/08 10:38 by val