Commit 835cb691 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Added systemd unit file and gitlab-runner config

parent 17f71e9b
all: all: gitlab-runner-config gitlab-runner-service
mkdir -p ../go/go/src/gitlab.com/gitlab-runner mkdir -p ../go/go/src/gitlab.com/gitlab-runner
mkdir -p ../go/gocache mkdir -p ../go/gocache
tar xf gitlab-runner-v13.1.0.tar.gz -C ../go/go/src/gitlab.com/gitlab-runner tar xf gitlab-runner-v13.1.0.tar.gz -C ../go/go/src/gitlab.com/gitlab-runner
...@@ -7,3 +7,35 @@ all: ...@@ -7,3 +7,35 @@ all:
cd ../go/go/src/gitlab.com/gitlab-runner/gitlab-runner && install -D -m 755 out/binaries/gitlab-runner /usr/bin/gitlab-runner cd ../go/go/src/gitlab.com/gitlab-runner/gitlab-runner && install -D -m 755 out/binaries/gitlab-runner /usr/bin/gitlab-runner
rm -rf /usr/local/share/.cache rm -rf /usr/local/share/.cache
rm -rf ../go/gocache rm -rf ../go/gocache
install -m755 -d /etc/gitlab-runner
@echo "$$GITLAB_RUNNER_CONFIG" > /etc/gitlab-runner/config.toml
@echo "$$GITLAB_RUNNER_SERVICE" > /lib/systemd/system/gitlab-runner.service
systemctl enable gitlab-runner.service
gitlab-runner-config:
define GITLAB_RUNNER_CONFIG
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
endef
export GITLAB_RUNNER_CONFIG
gitlab-runner-service:
define GITLAB_RUNNER_SERVICE
[Unit]
Description=GitLab Runner
After=syslog.target network.target
[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/bin/gitlab-runner run --working-directory /var/lib/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user root
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target
endef
export GITLAB_RUNNER_SERVICE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment