gitlab-runner-gateway/misc/doc-gitlab-runner.md

41 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

# gitlab runner
## start gitlab runner
```shell script
2020-09-16 22:37:33 +00:00
docker run -d --name gitlab-runner --restart always -v /var/run/docker.sock:/var/run/docker.sock -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest
```
## register new runner
```shell script
2020-09-16 22:37:33 +00:00
gitlab-runner register -non-interactive --description "manualy registered gitlab runner" --url "http://172.17.0.1:8080/" --registration-token "3b79eb1f-32f3-4db2-ad1b-6702e476d839" --tag-list "docker,manual" --executor shell
```
with curl
```shell script
2020-09-16 22:37:33 +00:00
curl --request POST -H 'Content-Type: application/json' "http://localhost:8080/api/v4/runners" -d '{"description":"manualy registered gitlab runner","tag_list":"docker,manual","run_untagged":false,"locked":true,"active":true,"info":{"name":"gitlab-runner","version":"13.3.1","revision":"738bbe5a","platform":"linux","architecture":"amd64","features":{"variables":false,"image":false,"services":false,"artifacts":false,"cache":false,"shared":false,"upload_multiple_artifacts":false,"upload_raw_artifacts":false,"session":false,"terminal":false,"refspecs":false,"masking":false,"proxy":false,"raw_variables":false,"artifacts_exclude":false,"multi_build_steps":false}},"token":"registration_token"}'
```
## unregister runner
```shell script
gitlab-runner unregister --url "http://172.17.0.1:8080/" --token "3b79eb1f-32f3-4db2-ad1b-6702e476d839"
```
## list runners
```shell script
2020-09-16 22:37:33 +00:00
gitlab-runner list
```
local listing :
cf => /etc/gitlab-runner/config.toml
## verify which runner is always alive
```shell script
2020-09-16 22:37:33 +00:00
gitlab-runner verify --delete
```