Reputation: 322
I am doing a server that has gitlab
and gitci
, both are working fine at the moment, but there are no runners.
I'm trying to use this runner, and managed to do it locally, but now I'm trying to create a service to launch the setup with my credentials (they are correct) and it doesn't work or throw any error.
Here's my .service:
ExecStartPre=-/usr/bin/docker kill gitlab-runner-jdk-maven
ExecStartPre=-/usr/bin/docker rm gitlab-runner-jdk-maven
ExecStartPre=/usr/bin/docker pull lemonbar/gitlab-runner-jdk-maven:1.0
ExecStart=/usr/bin/docker run --name gitlab-runner-jdk-maven -P -d \
-e 'CI_SERVER_URL=myserver -e 'REGISTRATION_TOKEN=mytoken'\
-v /opt/gitlab-runner-jdk-maven:/home/gitlab_ci_runner/data \
lemonbar/gitlab-runner-jdk-maven:1.0 app:setup
Upvotes: 2
Views: 694
Reputation: 322
I've found it myself after a lot of trial error, you only need to app setup once and the runner will be mounted automatically whenever its needed.
Note:if you make a runner a service don't freak out if its not working (because it will only show its working when its compiling something)
Upvotes: 1