From 69634022232d59718dd54ccf46f0ec3d7ef8358c Mon Sep 17 00:00:00 2001 From: Cyteen May Date: Tue, 18 Feb 2020 20:33:14 +0000 Subject: [PATCH] Add an install script for runner and a runner script. --- 020_gitlab-runner.sh | 20 ++++++++++++++++++++ README.md | 18 +++++++++++++++++- gitlab-ci-runner.sh | 11 +++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 020_gitlab-runner.sh create mode 100644 gitlab-ci-runner.sh diff --git a/020_gitlab-runner.sh b/020_gitlab-runner.sh new file mode 100644 index 0000000..3897f6a --- /dev/null +++ b/020_gitlab-runner.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +apt-get install -y curl apt-transport-https gnupg + +OS=debian +DIST=stretch +GPG_KEY_URL="https://packages.gitlab.com/runner/gitlab-runner/gpgkey" + +cat > /etc/apt/sources.list-available/runner_gitlab-runner.list < /dev/null | apt-key add - &>/dev/null + +apt-get update + +apt-get install -y gitlab-runner diff --git a/README.md b/README.md index 366251f..2a7d9ef 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,20 @@ conflict with git-buildpackage, so this image should help things. It should also provide a local cache of the base packages needed to run git-buildpackage builds. -Change the image name in build.sh to create a local image. +Change the image name in build.sh to create a local docker image + +Run 020_gitlab-runner.sh to install gitlab-runner. + +Change the GITLAB_URL and CI_TOKEN in gitlab-ci-runner.sh to point to your project. + +The settings are found on the project page settings -> CI / CD -> Runners +under 'Set up a specific Runner manually' + +https://git.devuan.org/${USERNAME}/${PROJECT}/settings/ci_cd + +GITLAB_URL=https://git.devuan.org/ +CI_TOKEN={UNIQUE_IDENTIFIER} + +Run gitlab-ci-runner.sh + + diff --git a/gitlab-ci-runner.sh b/gitlab-ci-runner.sh new file mode 100644 index 0000000..f24d48f --- /dev/null +++ b/gitlab-ci-runner.sh @@ -0,0 +1,11 @@ +GITLAB_URL=http://git.devuan.org/cyteen/bluealsa + +CI_TOKEN=2hfzsf2Egy1_z9MjnBJb + +gitlab-ci-multi-runner register \ +--non-interactive \ +--url "$(GITLAB_URL)" \ +--registration-token "$(CI_TOKEN)" \ +--description "Generic devuan beowulf package build runner" \ +--executor "docker" \ +--docker-image "cyteen/generic-package-build-runner:v1"