[libvirt-jenkins-ci PATCH 1/5] guests: templates: Introduce a gitlab-runner systemd service template

Erik Skultety eskultet at redhat.com
Fri Apr 3 07:16:07 UTC 2020


On Tue, Mar 31, 2020 at 04:32:15PM +0200, Andrea Bolognani wrote:
> On Thu, 2020-03-26 at 14:33 +0100, Erik Skultety wrote:
> > +++ b/guests/playbooks/update/templates/gitlab-runner.service.j2
> > @@ -0,0 +1,12 @@
> > +[Unit]
> > +Description=GitLab Runner
> > +After=network.target
> > +ConditionFileIsExecutable=/usr/local/bin/gitlab-runner
> > +
> > +[Service]
> > +ExecStart=/usr/local/bin/gitlab-runner run --user gitlab --working-directory /home/gitlab --config /home/gitlab/.gitlab-runner/config.toml
>
> Since we're going to use /home/gitlab as the base directory for all
> things gitlab-runner, I would suggest we store the gitlab-runner
> binary itself inside that directory too, and since we're pointing
> the application to the configuration file explicitly we could
> shorten that a bit and use /home/gitlab/config.toml as the path.
>
> The only setting that concerns me a bit is --working-directory: is
> that the base directory for gitlab-runner's operation, or is that
> the one where it will store source code and temporary files? Because
> in the latter case I would feel more comfortable if we used a
> subdirectory of /home/gitlab, rather than the home directory itself,
> as path.

IIUC it uses it for both, but it creates a very long subdirectory structure by
default anyway, so there's nothing here to be concerned about really.

--
Erik Skultety




More information about the libvir-list mailing list