2

I'm currently running a Gitlab Runner on Raspberry Pi (3B+). I started it with the config.toml below :

[[runners]]
  name = "gitlab-runner-pi"
  url = "https://gitlab.com"
  token = "XXXXXXX"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
  [runners.cache]

I registered it on my gitlab repository as well, it is online and running.

But whenever i start my build, this happens :

Running with gitlab-runner 11.1.0 (081978aa)
  on gitlab-runner-pi c2292b01
Using Docker executor with image java:8-jdk ...
Starting service docker:dind ...
Pulling docker image docker:dind ...
Using docker image sha256:61cb6998bd37f6fddf8ad9da28d37b8fbbe74e5a25a159a76d02cdfa5a21c429 for docker:dind ...

Cloning repository...
fatal: unable to access 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.com/my-project.git/': Could not resolve host: gitlab.com

You can also see my gitlab-ci.yml :

image: java:8-jdk

stages:
  - build
  - package

before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle
  - docker info

cache:
  paths:
    - .gradle/wrapper
    - .gradle/caches
build:
  stage: build
  script:
    - ./gradlew build
  artifacts:
    paths:
      - build/libs/*.jar
    expire_in: 1 week
  only:
    - master

docker-build:
  image: docker:stable
  services:
   - docker:dind
  stage: package
  script:
    docker build -t registry.gitlab.com/my-project .
    docker push registry.gitlab.com/my-project

after_script:
  - echo "End CI"

I believe this is a networking issue, as I found multiple suggestions on SO, but none have been working so far. I already tried the gitlab_default for network mode.

Thank you for your help.

PurplePanda
  • 258
  • 4
  • 16
  • Yes i can pig gitlab.com from the Raspberry. So you're saying that I can't use a specific runner for the real gitlab.com instance ? Because this is what i'm trying to do : I want to use my runner for the real gitlab.com instance, and I succeded to register my runner. – PurplePanda Jul 31 '18 at 12:23
  • It's definitely possible, error doesn't come from the fact that you're using your own runner with gitlab.com – gcharbon Aug 16 '18 at 14:32

0 Answers0