I'm running both gitlab and runner in separate containers. Gitlab is accesssible on localhost port 80 and I can clone with
http://username:[email protected]/root/citest.git
172.17.0.1 being the ip of the docker0 interface on my box However, when running any pipeline I'm getting the dreaded "You appear to have cloned an empty repository" issue. Investigation showed that the runner has the following remote:
[remote "origin"]
url = http://gitlab-ci-token:jEZ_WtWKR4LaP63Qrk_E@b4b32c3cc3e7/root/citest.git
b4b32c3cc3e7 is the gitlab-ce container id
I guess this is because I'm running gitlab on a container and I haven't configured a specific domain name?
If my guess is correct, is there any environment variable I can set in my gitlabci.yml to adjust the location of the gitlab server?
Otherwise, is there any way where I can make the runner always know gitlab's ip which is changing?
The above is a bit specialized and maybe confusing so here's some background: I'm trying to make a devops lab for students to learn git, ci/cd and other devops-y practices on. I can only deploy this ad-hoc on my laptop on whatever ip I have at that time and ask them to connect to my box. Under these circumstances I don't see any way to set a domain or anything static in gitlab other than a container ip, right?