diff --git a/broker.sh b/broker.sh index c464aa2..8821bd4 100755 --- a/broker.sh +++ b/broker.sh @@ -650,6 +650,24 @@ git_list_dirs_under () { ###################################################################### # 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 () { scp rancher@gitlab.adamo.network:~/* . } diff --git a/data.json b/data.json index fc36346..a3f5c87 100644 --- a/data.json +++ b/data.json @@ -28,7 +28,7 @@ ] }, "gitlab": { - "repo": "sys/adamocomp.git", + "repo": "GITLABREPO.git", "docker": { "issue_path": "/opt/gitlab", "image": "gitlab/gitlab-ce:latest", @@ -60,6 +60,27 @@ "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": { "repo": "apps/asciiflow.git", "docker": {