summaryrefslogtreecommitdiff
path: root/dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [master] <gitlab@liguros.net>2021-01-27 18:53:03 +0000
committerLiguros - Gitlab CI/CD [master] <gitlab@liguros.net>2021-01-27 18:53:03 +0000
commit3482ddf943eff7b8848f1fb31350b99ce349e86a (patch)
tree9c9bb6ec6679e9dc44a84d87ba611989409b12ca /dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild
parent8e8120eabdd28020aa69c7a60505cce2edd20adc (diff)
downloadbaldeagleos-repo-21.1.3.tar.gz
baldeagleos-repo-21.1.3.tar.xz
baldeagleos-repo-21.1.3.zip
Updating liguros repov21.1.3
Diffstat (limited to 'dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild')
-rw-r--r--dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild b/dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild
new file mode 100644
index 000000000000..c59aefe786da
--- /dev/null
+++ b/dev-util/gitlab-runner/gitlab-runner-13.8.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2020-2021 Liguros Authors
+# Distributed under the terms of the GNU General Public License v2
+EAPI=7
+
+EGO_PN="gitlab.com/gitlab-org/gitlab-runner"
+BASE_URI="https://gitlab-runner-downloads.s3.amazonaws.com/v${PV}/helper-images/prebuilt-_arch_.tar.xz"
+
+inherit golang-build golang-vcs-snapshot user readme.gentoo-r1 systemd tmpfiles user
+
+DESCRIPTION="GitLab Runner"
+HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-runner"
+SRC_URI="https://${EGO_PN}/repository/v${PV}/archive.tar.bz2 -> ${P}.tar.bz2
+ docker? ( amd64? ( ${BASE_URI/_arch_/x86_64} -> prebuilt-x86_64-v${PV}.tar.xz ) )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="docker"
+
+RDEPEND="docker? ( >=app-emulation/docker-1.13.0 )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror strip"
+
+DOCS=( "${S}"/src/"${EGO_PN}"/{CHANGELOG,README}.md )
+
+DOC_CONTENTS="Register the runner as root using\\n
+\\t# gitlab-runner register\\n
+Configure the runner in /etc/gitlab-runner/config.toml"
+
+pkg_setup() {
+ enewgroup gitlab
+ enewuser runner -1 /bin/bash /var/lib/gitlab-runner gitlab
+}
+
+src_unpack() {
+ golang-vcs-snapshot_src_unpack
+
+ if use docker ; then
+ mkdir -p "${S}"/out/helper-images || die "mkdir failed"
+ if use amd64 ; then
+ ln -sf "${DISTDIR}"/prebuilt-x86_64-v${PV}.tar.xz \
+ "${S}"/out/helper-images/prebuilt-x86_64.tar.xz \
+ || die "ln failed"
+ fi
+ fi
+}
+
+src_install() {
+ einstalldocs
+
+ exeinto /usr/libexec/gitlab-runner
+ doexe gitlab-runner
+ dosym ../libexec/gitlab-runner/gitlab-runner /usr/bin/gitlab-runner
+
+ if use docker ; then
+ insinto /usr/libexec/gitlab-runner/helper-images
+ doins -r out/helper-images/*.tar.xz
+ fi
+
+ newconfd "${FILESDIR}"/gitlab-runner.confd gitlab-runner
+ newinitd "${FILESDIR}"/gitlab-runner.initd gitlab-runner
+ systemd_dounit "${FILESDIR}"/gitlab-runner.service
+ newtmpfiles "${FILESDIR}"/gitlab-runner.tmpfile gitlab-runner.conf
+
+ readme.gentoo_create_doc
+
+ insopts -orunner -ggitlab -m0600
+ insinto /etc/gitlab-runner
+ doins "${S}"/src/"${EGO_PN}"/config.toml.example
+
+ diropts -orunner -ggitlab -m0700
+ keepdir /etc/gitlab-runner /var/lib/gitlab-runner
+}
+
+pkg_postinst() {
+ tmpfiles_process gitlab-runner.conf
+ readme.gentoo_print_elog
+}