kumquat-buildroot/package/gitlab-runner/gitlab-runner.mk
Marcin Niestroj eb671037fb package/gitlab-runner: new package
We rely on config.toml to be created manually during first boot as
setup stage. Even with an empty config.toml file, the gitlab-runner
needs gitlab registration token to register to a gitlab server.

Use the 14.5.1 release since 14.5.2 and 14.6.0 triggers a build error [1]
due a patch for GO < 1.17.
(helpers/patches/issue_28732/syscall.go:11:2: undefined: syscall.Issue28732Fix)

Tested:
https://gitlab.com/kubu93/buildroot/-/pipelines/442604876

[1] https://gitlab.com/gitlab-org/gitlab-runner/-/issues/28766

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-27 17:33:06 +02:00

34 lines
1.1 KiB
Makefile

################################################################################
#
# gitlab-runner
#
################################################################################
GITLAB_RUNNER_VERSION = 14.5.1
GITLAB_RUNNER_SITE = https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$(GITLAB_RUNNER_VERSION)
GITLAB_RUNNER_LICENSE = MIT
GITLAB_RUNNER_LICENSE_FILES = LICENSE
GITLAB_RUNNER_LDFLAGS = \
-X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=$(GITLAB_RUNNER_VERSION)
# Don't run gitlab runner as root.
define GITLAB_RUNNER_USERS
gitlab-runner -1 gitlab-runner -1 * /var/run/dbus /bin/false - Gitlab Runner
endef
define GITLAB_RUNNER_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/gitlab-runner/S95gitlab-runner \
$(TARGET_DIR)/etc/init.d/S95gitlab-runner
endef
define GITLAB_RUNNER_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/var/lib/gitlab-runner
$(INSTALL) -D -m 0644 package/gitlab-runner/gitlab-runner.service \
$(TARGET_DIR)/usr/lib/systemd/system/gitlab-runner.service
endef
GITLAB_RUNNER_POST_INSTALL_TARGET_HOOKS += GITLAB_RUNNER_INSTALL_CONFIG
$(eval $(golang-package))