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/09/23 19:45]
val [Пример shell docker]
инструмент_gitlab [2022/09/24 16:54]
val [Подключение через API]
Line 49: Line 49:
 ==== Подключение через API ==== ==== Подключение через API ====
  
-  * [[https://​docs.gitlab.com/​ee/​user/​project/​settings/​project_access_tokens.html|Project access tokens]] (в примере достаточно ​пункта ​api)+  * [[https://​docs.gitlab.com/​ee/​user/​project/​settings/​project_access_tokens.html|Project access tokens]] (в примере достаточно ​role: Reporter, Scopes: ​api)
   * [[https://​stackoverflow.com/​questions/​39559689/​where-do-i-find-the-project-id-for-the-gitlab-api|Where do I find the project ID for the GitLab API?]]   * [[https://​stackoverflow.com/​questions/​39559689/​where-do-i-find-the-project-id-for-the-gitlab-api|Where do I find the project ID for the GitLab API?]]
   * [[https://​stackoverflow.com/​questions/​56943327/​how-to-download-a-single-file-from-gitlab|How to download a single file from GitLab?]]   * [[https://​stackoverflow.com/​questions/​56943327/​how-to-download-a-single-file-from-gitlab|How to download a single file from GitLab?]]
  
 <​code>​ <​code>​
-root@node2:~# curl --header "​PRIVATE-TOKEN:​ NNNNNNNNNNNNNNNNNNNNN"​ "​http://​server.corp13.un/​api/​v4/​projects/​4/​repository/​files/​docker-compose.yml/​raw?​ref=master"​ | tee docker-compose.yml+root@node1:~# curl --header "​PRIVATE-TOKEN:​ NNNNNNNNNNNNNNNNNNNNN"​ "​http://​server.corp13.un/​api/​v4/​projects/​4/​repository/​files/​docker-compose.yml/​raw?​ref=master"​ | tee docker-compose.yml
 </​code>​ </​code>​
  
Line 241: Line 241:
 <​code>​ <​code>​
 gitlab-runner@server:​~/​webd$ cat build.sh gitlab-runner@server:​~/​webd$ cat build.sh
-... 
- ​--->​ Using cache 
-... 
-..............:​ Layer already exists 
-... 
 </​code><​code>​ </​code><​code>​
 #!/bin/sh #!/bin/sh
Line 263: Line 258:
 </​code><​code>​ </​code><​code>​
 gitlab-runner@server:​~/​webd$ sh build.sh gitlab-runner@server:​~/​webd$ sh build.sh
 +...
 +Step...
 + ​--->​ Using cache
 +...
 +..............:​ Pushed
 +...
 +..............:​ Layer already exists
 +...
 +latest: digest...
 </​code><​code>​ </​code><​code>​
 gitlab-runner@server:​~/​webd$ cat .gitlab-ci.yml gitlab-runner@server:​~/​webd$ cat .gitlab-ci.yml
инструмент_gitlab.txt · Last modified: 2024/06/13 08:39 by val