Added function to register gitlab runners.
This commit is contained in:
parent
8d3f50b3d7
commit
1513acf12d
18
broker.sh
18
broker.sh
@ -650,6 +650,24 @@ git_list_dirs_under () {
|
|||||||
######################################################################
|
######################################################################
|
||||||
# Gitlab operations
|
# Gitlab operations
|
||||||
|
|
||||||
|
# $1: gitlab token
|
||||||
|
gitlab_runner_register_on_host () {
|
||||||
|
#docker run --rm -t -i -v \
|
||||||
|
# /srv/gitlab-runner/config:/etc/gitlab-runner \
|
||||||
|
docker run --rm -v /srv/gitlab-runner/config:/etc/gitlab-runner \
|
||||||
|
gitlab/gitlab-runner register \
|
||||||
|
--non-interactive \
|
||||||
|
--executor "docker" \
|
||||||
|
--docker-image alpine:latest \
|
||||||
|
--url "https://gitlab.adamo.network" \
|
||||||
|
--registration-token "$1" \
|
||||||
|
--description "adamocomp-runner" \
|
||||||
|
--tag-list "docker,adamocomp" \
|
||||||
|
--run-untagged="true" \
|
||||||
|
--locked="false" \
|
||||||
|
--access-level="not_protected"
|
||||||
|
}
|
||||||
|
|
||||||
gitlab_download_backups () {
|
gitlab_download_backups () {
|
||||||
scp rancher@gitlab.adamo.network:~/* .
|
scp rancher@gitlab.adamo.network:~/* .
|
||||||
}
|
}
|
||||||
|
23
data.json
23
data.json
@ -28,7 +28,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gitlab": {
|
"gitlab": {
|
||||||
"repo": "sys/adamocomp.git",
|
"repo": "GITLABREPO.git",
|
||||||
"docker": {
|
"docker": {
|
||||||
"issue_path": "/opt/gitlab",
|
"issue_path": "/opt/gitlab",
|
||||||
"image": "gitlab/gitlab-ce:latest",
|
"image": "gitlab/gitlab-ce:latest",
|
||||||
@ -60,6 +60,27 @@
|
|||||||
"Running as a bootstrap."
|
"Running as a bootstrap."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"gitlab-runner": {
|
||||||
|
"repo": "GITLABRUNNERREPO.git",
|
||||||
|
"docker": {
|
||||||
|
"issue_path": "/opt/gitlab-runner",
|
||||||
|
"image": "gitlab/gitlab-runner:latest",
|
||||||
|
"options": [
|
||||||
|
[
|
||||||
|
"--rm"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"--volume",
|
||||||
|
"/srv/gitlab-runner/config:/etc/gitlab-runner",
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
],
|
||||||
|
["--restart","always"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"suggest": [
|
||||||
|
"Can't reach the volumes?"
|
||||||
|
]
|
||||||
|
},
|
||||||
"asciiflow": {
|
"asciiflow": {
|
||||||
"repo": "apps/asciiflow.git",
|
"repo": "apps/asciiflow.git",
|
||||||
"docker": {
|
"docker": {
|
||||||
|
Loading…
Reference in New Issue
Block a user