GItlab is unable to upload artifacts when building inside docker
.gitlab-ci.yml build script:
image: golang:1.6
stages:
- build
build service:
stage: build
script:
- ping -c 1 gitlab.local
- go build pav/auth
artifacts:
paths:
- auth
only:
- master
runner's config.toml:
concurrent = 1
[[runners]]
name = "docker-runner"
url = "http://gitlab.local/ci"
token = "0695056e8a8ec6bb20c65fd2d4269b"
tls-ca-file = ""
executor = "docker"
[runners.docker]
image = "ubuntu:14.04"
allowed_images = ["golang:*"]
links = ["gitlab:gitlab.local"]
privileged = false
volumes = ["/cache"]
For some strange reason ping can see the host "gitlab.local" but artifact uploader can't This host is provided by linking runner's container to the gitlab's container
Build log looks like:
gitlab-ci-multi-runner 1.0.4 (014aa8c)
Using Docker executor with image golang:1.6 ...
Running on runner-0695056e-project-1-concurrent-0 via 36f75d7256f7...
Fetching changes...
Removing artifacts.zip
Removing auth
HEAD is now at e04dfce artifacts definition
From http://gitlab.local/pav/auth
e04dfce..6139582 master -> origin/master
Checking out 61395828 as master...
Previous HEAD position was e04dfce... artifacts definition
HEAD is now at 6139582... CI test
$ ping -c 1 gitlab.local
PING gitlab.local (172.17.0.1) 56(84) bytes of data.
64 bytes from gitlab.local (172.17.0.1): icmp_seq=1 ttl=64 time=0.110 ms
--- gitlab.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.110/0.110/0.110/0.000 ms
$ go build pav/auth
Archiving artifacts...
auth: found 1 matching files
Creating archive artifacts.zip ...
Done!
Uploading artifacts...
WARNING: Uploading artifacts to coordinator... failed couldn't execute POST against http://gitlab.local/ci/api/v1/builds/31/artifacts: Post http://gitlab.local/ci/api/v1/builds/31/artifacts: dial tcp: lookup gitlab.local: no such host id=31 token=tn7JxWjA
WARNING: Retrying...
WARNING: Uploading artifacts to coordinator... failed couldn't execute POST against http://gitlab.local/ci/api/v1/builds/31/artifacts: Post http://gitlab.local/ci/api/v1/builds/31/artifacts: dial tcp: lookup gitlab.local: no such host id=31 token=tn7JxWjA
WARNING: Retrying...
WARNING: Uploading artifacts to coordinator... failed couldn't execute POST against http://gitlab.local/ci/api/v1/builds/31/artifacts: Post http://gitlab.local/ci/api/v1/builds/31/artifacts: dial tcp: lookup gitlab.local: no such host id=31 token=tn7JxWjA
WARNING: Retrying...
ERROR: Build failed with: exit code 1