1

EDIT: After modifying the configuration file and keep trying and trying, I finally decided to just purge GitLab runner and reinstall it again. After reinstall and do the registration, everyting works fine.

I tried to create an automatic deployment whenever a code is pushed to my GitLab repository. The deployment would just have the repository files cleaned and then copied into /var/www. I set up a runner on the server with these registration:

root@ubuntu-512mb-xxxx:~# gitlab-runner register
Running in system-mode.

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
https://gitlab.com/ci
Please enter the gitlab-ci token for this runner:
8xxxxxxxxxxxxxxxxxx
Please enter the gitlab-ci description for this runner:
[ubuntu-512mb-xxxx]:
Please enter the gitlab-ci tags for this runner (comma separated):

Registering runner... succeeded                     runner=8WKnQjRb
Please enter the executor: virtualbox, ssh, shell, parallels, docker, docker-ssh:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically re
loaded!

So I assume that the builds will be running on my host server directly.

Here is the toml file:

concurrent = 1

[[runners]]
  name = "ubuntu-512mb-xxxx"
  url = "https://gitlab.com/ci"
  token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  tls-ca-file = ""
  executor = "shell"
  [runners.ssh]
  [runners.docker]
    image = ""
    privileged = false
  [runners.parallels]
    base_name = ""
  [runners.virtualbox]
    base_name = ""

However, the resulting build log from gitlab indicates that it is still using docker to run the build.

gitlab-ci-multi-runner 1.0.0 (xxxxxxx)
Using Docker executor with image ruby:2.1 ...
Pulling docker image mysql:latest ...
Starting service mysql:latest ...
Pulling docker image postgres:latest ...
Starting service postgres:latest ...
Pulling docker image redis:latest ...
Starting service redis:latest ...
Waiting for services to be up and running...
Pulling docker image ruby:2.1 ...

Running on runner-xxxxxxx-project-xxxxxxx-concurrent-0 via xxxxxxxxxxxxxxx...
Cloning repository...
Cloning into '/builds/group/project'...
Checking out xxxxxxx as master...
Note: checking out 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
  1. How can I run the build locally on the host environment?
  2. Is there any way to do a continuous deployment with GitLab CI that just simply copy the file of the repository to another directory?

Please, do not suggest webhooks as I am learning about GitLab CI Runner right now.

Thanks.

Aidity
  • 41
  • 10
  • If you're using the shell executor, then why not just remove the docker, parallels, and virtualbox sections? – BrokenBinary Jan 25 '16 at 16:21
  • It was already there after generated using `gitlab-runner register`, so I thought it was okay to leave it there. – Aidity Jan 26 '16 at 05:49
  • It sounds like you have more than one runner running, and the other runner is picking up the build. Check both config file locations. If you run gitlab-runner as root or with sudo, then your configuration file is located at `/etc/gitlab-runner/config.toml`. Otherwise it's located at `~/.gitlab-runner/config.toml`. – BrokenBinary Jan 26 '16 at 16:55

0 Answers0