gitlab-runner.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. ################################################################################
  2. #
  3. # gitlab-runner
  4. #
  5. ################################################################################
  6. GITLAB_RUNNER_VERSION = 15.5.0
  7. GITLAB_RUNNER_SITE = https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$(GITLAB_RUNNER_VERSION)
  8. GITLAB_RUNNER_LICENSE = MIT
  9. GITLAB_RUNNER_LICENSE_FILES = LICENSE
  10. GITLAB_RUNNER_LDFLAGS = \
  11. -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=$(GITLAB_RUNNER_VERSION)
  12. # Don't run gitlab runner as root.
  13. define GITLAB_RUNNER_USERS
  14. gitlab-runner -1 gitlab-runner -1 * /var/run/dbus /bin/false - Gitlab Runner
  15. endef
  16. define GITLAB_RUNNER_INSTALL_INIT_SYSV
  17. $(INSTALL) -m 0755 -D package/gitlab-runner/S95gitlab-runner \
  18. $(TARGET_DIR)/etc/init.d/S95gitlab-runner
  19. endef
  20. define GITLAB_RUNNER_INSTALL_INIT_SYSTEMD
  21. mkdir -p $(TARGET_DIR)/var/lib/gitlab-runner
  22. $(INSTALL) -D -m 0644 package/gitlab-runner/gitlab-runner.service \
  23. $(TARGET_DIR)/usr/lib/systemd/system/gitlab-runner.service
  24. endef
  25. GITLAB_RUNNER_POST_INSTALL_TARGET_HOOKS += GITLAB_RUNNER_INSTALL_CONFIG
  26. $(eval $(golang-package))