summaryrefslogtreecommitdiff
path: root/dev-util/gitlab-runner
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
commite68d405c5d712af4387159df07e226217bdda049 (patch)
tree009ab0f3d427f0813e62930d71802cb054c07e30 /dev-util/gitlab-runner
parent401101f9c8077911929d3f2b60a37098460a5d89 (diff)
gentoo resync : 06.04.2022
Diffstat (limited to 'dev-util/gitlab-runner')
-rw-r--r--dev-util/gitlab-runner/Manifest8
-rw-r--r--dev-util/gitlab-runner/files/gitlab-runner.confd19
-rw-r--r--dev-util/gitlab-runner/files/gitlab-runner.initd38
-rw-r--r--dev-util/gitlab-runner/files/gitlab-runner.service18
-rw-r--r--dev-util/gitlab-runner/files/gitlab-runner.tmpfile1
-rw-r--r--dev-util/gitlab-runner/gitlab-runner-14.9.1-r1.ebuild60
-rw-r--r--dev-util/gitlab-runner/metadata.xml12
7 files changed, 156 insertions, 0 deletions
diff --git a/dev-util/gitlab-runner/Manifest b/dev-util/gitlab-runner/Manifest
new file mode 100644
index 000000000000..bca674e75ba0
--- /dev/null
+++ b/dev-util/gitlab-runner/Manifest
@@ -0,0 +1,8 @@
+AUX gitlab-runner.confd 688 BLAKE2B 1e99cdca8949a1a085e126c9aa2f23cf15d081087d022ca7a8628ffebd07a645abf3d01a0a3af156fb95c8865e75c2a1c986dec8bc63d47180210d66b184cbcf SHA512 63e846e7f5d5799c3e5b0ec6103dd82d00efd6dd1aa6007da4c7a8c513e3b135d7790fab19e2a3db4d2511cd42236da74dd307c45fe81bbf7d4779b9e1beaaeb
+AUX gitlab-runner.initd 1174 BLAKE2B 53b897abb3bc358839843faf56b52d99412c2a08e2e69e1b8258bab907a0da10dedeafd95e6c4e505fd7e8e4d2344dc07b1e693a130fe0d6a3730bf619ee2e75 SHA512 eae2668c5a98a9e111573a2ea193266252e46e073fafd2c101d3a93e65cb9705f78ceab173ca4d3e1c806443345e7f66b7b97c8b644188cf9f86dc4c087d401f
+AUX gitlab-runner.service 476 BLAKE2B ef171fac56e60f72f0bd62e9869fb60160b71a13a0a36c2bd3bd68d70199d65a55744d41fb49ae493d53bc5df7669884249dc75f3437dc2d0e04a111bf303982 SHA512 65e3afc5376146154b713257fc2d9064a63419440f0767dab06a478de5d86c6f0bfe4978a1f78ba07f239f7eb59c389c9fd0248252c727bcc27605e8930925c3
+AUX gitlab-runner.tmpfile 54 BLAKE2B 4b2849b9c72998409efce207a336dce42d6e9104e72e0071266e03509841bbb5f39ad8e560beb696eee780bfe82efdec5b877120b5606c524d5cd002095e52c4 SHA512 2b5cccd83c8113a8c58011ced9ff5720a5aeaedb8f819c2a71c8fff3b1683ad87b54fa3da67b7e5f91ab35659d2adf5cf792d93ff293eee39924fbb5b9db2d4b
+DIST gitlab-runner-14.9.1-deps.tar.xz 142907928 BLAKE2B fb61c7b03d3dd63196bb4de0042a3c65035a3fc132435d7844635bb968a6bfe43e05fca053bfa96ba22cc9fd601d533857bffdf8bd734e90e86fefce8091da34 SHA512 d077cc1220ad33196655e578937c910c7b368eef57bb96d385eac0957e5f8902bb3720b1614f3179753929f25589a8d1d543bcb61d4cf5972bf4ada96a4056d8
+DIST gitlab-runner-14.9.1.tar.gz 1259997 BLAKE2B a4694198630fb2cc47ad4e9fe36b366ae695d8a4618e755b9ff12b608d5d8266614cc649b0e63bca125919ebe8dd40859fc7804cd8bb40ed391a54d6ae65a325 SHA512 ec804f3a4982414d52a4f3b5ff1560c5342a3650f1bb3edefa211a3810b17e202263abc67bfcd4423fe88b5acd501da1d23f3980a078800ab25932625ff75bc5
+EBUILD gitlab-runner-14.9.1-r1.ebuild 1618 BLAKE2B 5e21b60f1b9981a4f5c5382ad7d92a53659563ca3f7a168ab0f3c66e0f957f462f953ab2dd1a8922fa9ab9894a5d79f6cd780d26410023e5affa8c74c96daf90 SHA512 f5472f6a5181269073aafdc4c42587ca3461785d4aa0da669100634f93514d039b220f033135bdca52c8438a84d5b5c387c1f765ca8deaf269b9457b0b987acd
+MISC metadata.xml 376 BLAKE2B e75ba9851f2c9d80fe068897972ad9f2097434de89757faf594b02eac474767838dd1e596ecf7008aea59688bcca1d4f7354f92a13768a5831a17659611c1317 SHA512 da7660e0889127de58b9e866126ac461385bb86f2847cce3f9f3f92fd4d39d6c99c5f77b106f12e89b1aa2c3d851bb49858ca05c1fb9e56dc9e7ac98b71fc672
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.confd b/dev-util/gitlab-runner/files/gitlab-runner.confd
new file mode 100644
index 000000000000..513b2f9cef18
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.confd
@@ -0,0 +1,19 @@
+# config file for /etc/init.d/gitlab-runner
+# The convention is that the defaults are shown here, commented out.
+# Do not override these unless you know exactly what you are doing.
+
+# runner_config="/etc/gitlab-runner/config.toml"
+# runner_datadir="/var/lib/gitlab-runner"
+# runner_service="${RC_SVCNAME}"
+# runner_user="gitlab-runner"
+
+# Additional options
+# run /usr/bin/gitlab-runner -h to see available options
+# --config, --user, --service and --working-directory are set by the
+# above variables, so do not add them here.
+# RUNNER_OPTS=""
+
+# Logging
+# runner_logdir="/var/log/gitlab-runner"
+# output_log="${runner_logdir}/gitlab-runner.log"
+# error_log="${runner_logdir}/error.log"
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.initd b/dev-util/gitlab-runner/files/gitlab-runner.initd
new file mode 100644
index 000000000000..0e5c5ed224b6
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.initd
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/gitlab-runner"
+runner_datadir="${runner_datadir:-/var/lib/gitlab-runner}"
+command_args="run
+ --config ${runner_config:-/etc/gitlab-runner/config.toml}
+ --service ${runner_service:-${RC_SVCNAME}}
+ --user ${runner_user:-gitlab-runner}
+ --working-directory ${runner_datadir}
+ ${RUNNER_OPTS}"
+command_background=true
+extra_started_commands="reload"
+name="${name:-GitLab Runner}"
+pidfile="/run/${RC_SVCNAME}.pid"
+runner_user="${runner_user:-gitlab-runner}"
+runner_logdir="${runner_logdir:-/var/log/gitlab-runner}"
+output_log="${output_log:-${runner_logdir}/gitlab-runner.log}"
+error_log="${error_log:-${runner_logdir}/gitlab-runner.err}"
+retry="QUIT/60/TERM/60"
+required_files="${runner_config}"
+
+depend() {
+ need localmount
+ after net.lo loopback
+}
+
+start_pre() {
+ checkpath -d -m 0700 -o "${runner_user}" "${runner_datadir}"
+ checkpath -d -m 0750 -o "${runner_user}" "${runner_logdir}"
+}
+
+reload() {
+ ebegin "Reloading ${name} configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $? "Failed to reload ${name}"
+}
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.service b/dev-util/gitlab-runner/files/gitlab-runner.service
new file mode 100644
index 000000000000..047de5cc7363
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=GitLab Runner service
+After=syslog.target network.target
+ConditionFileIsExecutable=/usr/bin/gitlab-runner
+
+[Service]
+StartLimitInterval=5
+StartLimitBurst=10
+ExecStart=/usr/bin/gitlab-runner run -c /etc/gitlab-runner/config.toml -u gitlab-runner -d /var/lib/gitlab-runner --syslog
+Restart=always
+RestartSec=120
+StandardOutput=syslog
+StandardError=syslog
+SyslogIdentifier=gitlab-runner
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-util/gitlab-runner/files/gitlab-runner.tmpfile b/dev-util/gitlab-runner/files/gitlab-runner.tmpfile
new file mode 100644
index 000000000000..40453089f869
--- /dev/null
+++ b/dev-util/gitlab-runner/files/gitlab-runner.tmpfile
@@ -0,0 +1 @@
+d /run/gitlab-runner 0755 gitlab-runner gitlab-runner
diff --git a/dev-util/gitlab-runner/gitlab-runner-14.9.1-r1.ebuild b/dev-util/gitlab-runner/gitlab-runner-14.9.1-r1.ebuild
new file mode 100644
index 000000000000..1ad7cc8d7ccd
--- /dev/null
+++ b/dev-util/gitlab-runner/gitlab-runner-14.9.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd tmpfiles
+GIT_COMMIT=bd40e3da
+
+DESCRIPTION="The official GitLab Runner, written in Go"
+HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-runner"
+SRC_URI="https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v${PV}/${PN}-v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+COMMON_DEPEND="acct-group/gitlab-runner
+ acct-user/gitlab-runner"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND="dev-go/gox"
+
+DOCS=( docs CHANGELOG.md README.md config.toml.example )
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+src_compile() {
+ emake \
+ BUILT="$(date -u '+%Y-%m-%dT%H:%M:%S%:z')" \
+ GOX="${EPREFIX}/usr/bin/gox" \
+ REVISION=${GIT_COMMIT} \
+ VERSION=${PV} \
+ runner-bin-host
+}
+
+src_test() {
+ CI=0 ego test
+}
+
+src_install() {
+ dobin out/binaries/gitlab-runner
+ einstalldocs
+
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ keepdir /{etc,var/log}/${PN}
+ fowners gitlab-runner:gitlab-runner /{etc,var/log}/${PN}
+ fperms 0700 /{etc,var/log}/gitlab-runner
+}
+
+pkg_postinst() {
+ tmpfiles_process gitlab-runner.conf
+ [[ -f ${EROOT}/etc/gitlab-runner/config.toml ]] && return
+ elog
+ elog "To use the runner, you need to register it with this command:"
+ elog "# gitlab-runner register"
+ elog "This will also create the configuration file in /etc/gitlab-runner/config.toml"
+}
diff --git a/dev-util/gitlab-runner/metadata.xml b/dev-util/gitlab-runner/metadata.xml
new file mode 100644
index 000000000000..1b9e74b5f096
--- /dev/null
+++ b/dev-util/gitlab-runner/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>infra-bugs@gentoo.org</email>
+ <name>Gentoo Infrastructure Project</name>
+ </maintainer>
+</pkgmetadata>