I know this question is old, but I thought I answer it anyway, since I've been working on similar things at the moment and I thought I would like to answer it in a larger scale, to give a basic idea, a starting point, understanding the build process with GitLab-CI.
There are different ways to install a gitlab-runner on a system, as described here. It always will get down to installing the runner and after that registering the runner at your gitlab instance.
You will be guided through the registering process here.
During the registering process you will have to choose the executor on which builds will be realized.
These can be ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh and shell: docker.
Suppose you choose docker as an executor. Once a build has been passed to your runner, it will start a build container in which the build will be
executed. In some project setups is no image defined as a 'base environment'. So during the (docker executor) runner registration you will be asked
to define a default image that can be used as the build container, the environment for your build.
So if you have a project that is not defining a 'base environment' you have to choose one fulfilling your builds needs. E.g. if you run your build defined in an ant script you will either need an image that has ant installed or you will need to set up ant in your .gitlab-ci.yml.
In the .gitlab-ci.yml you will describe your build pipeline(s) (see more about that here). There you also can define more precisely how to clone your repo into your build container. But with the default configuration the cloning will happen every time a contributor is pushing changes on your code base to the git(lab) repository.
GitLab requires you to use the built-in git repository. This enables GitLab to clone the repos without further configuration (besides the administrative configuration you will have to go through setting up GitLab and maintaining it).
You can support the build container with additional containers (called 'services'), e.g. a database container for the tests to be run against during the build process.
For further information also see https://docs.gitlab.com/runner/ and https://docs.gitlab.com/ee/README.html