Questions tagged [gitlab-ci-runner]

This is GitLab Runner repository, this application run tests and sends the results to GitLab CI. GitLab CI is the open-source continuous integration server that coordinates the testing.

For Documentation see docs.gitlab.com/runner/

3028 questions
24
votes
3 answers

GitLab: Is it possible to run pipeline on a specific runner?

Is it possible to run a pipeline on a specific runner? (not using tags) Is it feasible to use environments, or even gitlab runner exec maybe? Scenario: Have an existing project with multiple runners already attached to it (specific project token…
Rekovni
  • 6,319
  • 3
  • 39
  • 62
23
votes
7 answers

[karma-server]: TypeError: Cannot read property 'range' of undefined - Angular Unit Testing in CI environment

Our CI/CD pipelines stopped working on the "ng test" job and fails with the following error message: [karma-server]: TypeError: Cannot read property 'range' of undefined at handleRangeHeaders…
mvorisek
  • 638
  • 1
  • 4
  • 8
23
votes
3 answers

apt not found when I use apt in gitlab ci before_script

I use gitlab ci to build docker image and I want to install python. When I build, the following is my gitlab-ci.yml: image: docker:stable stages: - test - build before-script: - apt install -y python-dev python pip test1: stage: test …
fuzes
  • 1,777
  • 4
  • 20
  • 40
23
votes
2 answers

How do you push to a gitlab repo using a gitlab-ci job?

I am new to GitLab CI/CD jobs, but I'm trying to set up a Python script that when pushed to GitLab, triggers the CI/CD job to run it, and call an internal function that pushes to GitLab again provided that certain criteria are met. So, for example,…
Chloe Bennett
  • 901
  • 2
  • 10
  • 23
23
votes
3 answers

GitLab-CI: Cannot link to a non running container

I've tried to get my setup work with gitlab-ci. I have a simple gitlab-ci.yml file build_ubuntu: image: ubuntu:14.04 services: - rikorose/gcc-cmake:gcc-5 stage: build script: - apt-get update - apt-get install -y python3…
Michael Aigner
  • 4,820
  • 4
  • 21
  • 33
23
votes
3 answers

GitLab CI preserve environment between build stages

I am working on a python project and using miniconda to manage my environment. I am using GitLab for CI with the following runner configuration stages: - build - test build: stage: build script: - if hash $HOME/miniconda/bin/conda…
Philip O'Brien
  • 4,146
  • 10
  • 46
  • 96
22
votes
4 answers

PostgreSQL: background worker "logical replication launcher" exited with exit code 1

Using our own instance of Gitlab we get the error background worker "logical replication launcher" exited with exit code 1 when trying to use the postgres service in our runners. Haven't found anything useful over the internet. Any idea what's going…
Mario Pérez Alarcón
  • 3,468
  • 2
  • 27
  • 38
22
votes
5 answers

docker login in custom gitlab-runner: No such host (http://docker:2375/v1.39/auth: dial tcp: lookup docker on 172.31.0.2:53: no such host)

I have a private repo on gitlab.com. I have already setup a CI/CD pipeline using gitlab shared runners. On code push, a docker image is built, login to gitlab private docker registry and push the image. It works fine with the shared runners. Now I'm…
ankit singh
  • 367
  • 1
  • 3
  • 13
22
votes
2 answers

Configure cache on GitLab runner

I don't manage to configure a cache directory, but somehow it does not work. I'm not even sure it takes the config.toml file. my config.toml: concurrent = 1 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] cache_dir =…
laurent exsteens
  • 431
  • 1
  • 5
  • 13
22
votes
4 answers

How to reattach a detached HEAD in GIT

(I can see there are many questions about this but I haven't found one that solves my exact problem). I'm running gitlab-ci and when the runner checks out my code it does so as a detached head. Here is what I get when running a git status command in…
Remotec
  • 10,304
  • 25
  • 105
  • 147
22
votes
2 answers

GitLab-CI Multi Runner php composer cache

I'm using gitlab-ci-multi-runner with docker containers. Everything is going fine, but docker containers don't keep the composer cache so in every run composer downloads dependencies again and again, which takes a lot of time. Is there any way to…
Arman P.
  • 4,314
  • 2
  • 29
  • 47
21
votes
3 answers

How to access variables in gitlab-ci.yml using gitlab-ci-multi-runner on windows

I can't find out how to access variables in a build-script provided by the gitlab-ci.yml-file. I have tried to declare variables in two ways: Private Variables in the Web-Interface of GitLab CI Variable overrides/apennding in config.toml I try to…
nozzleman
  • 9,529
  • 4
  • 37
  • 58
20
votes
4 answers

GitLab run pipeline only manually and not automatically

My GitLab pipelines execute automatically on every push, I want to manually run pipeline and not on every push. Pipeline docs: https://docs.gitlab.com/ee/ci/yaml/#workflowrules I tried this in .gitlab-ci.yml workflow: rules: - when: manual …
Anant_Kumar
  • 764
  • 1
  • 7
  • 23
20
votes
5 answers

Runner is not healthy and will be disabled

I hosts my repository with gitlab.com and I install runner in the DigitalOcean. It ran fine until today 16March2019 14:24 Thailand time. # gitlab-runner status Runtime platform arch=amd64 os=linux pid=16937…
joe
  • 8,383
  • 13
  • 61
  • 109
20
votes
3 answers

Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock

I started a docker container gitlab-ci-runner, and then register a runner using docker as executor, using node:latest as docker images. But when i push commit to gitlab,I got this error: Running with gitlab-runner 11.3.1 (0aa5179e) on docker-ci…
westfall
  • 343
  • 1
  • 3
  • 8