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
16
votes
1 answer

How to cache Gradle dependencies inside Gitlab CI

I add cache property inside my gitlab-ci.yml file in my Android project. cache: paths: - .gradle/wrapper - .gradle/caches But in each pipeline when I run ./gradlew assemble, It downloads all gradle dependencies which cause slow build…
user5250681
16
votes
3 answers

Can’t find my artifacts with GitLab CI

I'm using a shared runner, on gitlab.com. The guide here shows a section for job artifacts. But when I run my job and look at my job page, I just see this: There's no section for job artifacts. What should I try? Here's my .gitlab-ci.yml: image:…
giraffe
  • 721
  • 3
  • 9
  • 25
16
votes
1 answer

Docker-in-Docker with Gitlab Shared runner for building and pushing docker images to registry

Been trying to set-up Gitlab CI which can build a docker image, and came across that DinD was enabled initially only for separate runners and Blog Post suggest it would be enabled soon for shared runners, Running DinD requires enabling privileged…
Somasundaram Sekar
  • 5,244
  • 6
  • 43
  • 85
16
votes
2 answers

Gitlab CI cannot pull image from private docker registry

I'd like to create a Docker based Gitlab CI runner which pulls the docker images for the build from a private Docker Registry (v2). I cannot make the Gitlab Runner to pull the image from a local Registry, it tries to GET something from a /v1 API. I…
Nagy Vilmos
  • 1,878
  • 22
  • 46
15
votes
2 answers

Docker volume cleanup of gitlab-runner

I am new to docker and jenkins. However ultimately I am creating a job in jenkins so that I can delete the volume cache of gitlab-runner which is stored in our linux machines (CentOS7) To achieve this, I am creating a periodic job every 6 hours with…
Sameer Atharkar
  • 382
  • 1
  • 3
  • 17
15
votes
3 answers

Escape char in Gitlab Secret Variables

I have a secret var : But when I do - echo %MySecretVar%, runner displays foo only How can i escape special chars like ! in Gitlab Secret Vars ?
GGO
  • 2,678
  • 4
  • 20
  • 42
15
votes
2 answers

GitLab CI script needs entry in /etc/hosts

I have a GitLab CI docker runner to execute my automated tests when I push. One of my tests requires a custom entry in /etc/hosts. I can't figure out how to get the entry into that file. Here's basically what my .gitlab-ci.yml file looks…
Nathan Wallace
  • 2,154
  • 4
  • 23
  • 28
15
votes
1 answer

Unable to access docker-compose containers created inside docker

I have a docker-compose.yml file that starts up a simple HTTP echo service on port 8800. version: '2' services: echo-server: image: luisbebop/echo-server container_name: echo-server ports: - "8800:8800" Super…
Craig Otis
  • 31,257
  • 32
  • 136
  • 234
15
votes
2 answers

Stop gitlab runner to not remove a directory

I have a directory which is generated during a build and it should not be deleted in the next builds. I tried to keep the directory using cache in .gitlab-ci.yml: cache: key: "$CI_BUILD_REF_NAME" untracked: true paths: -…
PHA
  • 1,588
  • 5
  • 18
  • 37
15
votes
3 answers

How can I make Gitlab runner merge code into a branch on a successful build

Well the title is pretty much self-explanatory. In summary, I want a branch (i.e. dev) to be merged to another branch (i.e. production) IF the build is successful.
StLia
  • 1,012
  • 2
  • 12
  • 26
15
votes
1 answer

How do I mount a volume in a docker container in .gitlab-ci.yml?

I'm using .gitlab-ci.yml and docker as a GitLab CI runner on an Android project. At the end of the test run, gradlew saves test results in xml and html under the build directory: Finished generating test XML results (0.001 secs) into:…
Travis Holton
  • 185
  • 1
  • 1
  • 5
15
votes
1 answer

test after build would run in new environment on gitlab-ci

I have the following configuration as .gitlab-ci.yml but I found out after successfully pass build stage (which would create a virtualenv called venv), it seems that in test stage you would get a brand new environment(there's no venv directory at…
Chandler.Huang
  • 873
  • 3
  • 12
  • 24
14
votes
3 answers

Getting docker error while using shell gitlab-runner ERRO[0000]

Hello I got this error at the installation, when I use the command "gitlab-runner run" or "gitlab-runner start": ERRO[0000] Docker executor: prebuilt image helpers will be loaded from /var/lib/gitlab-runner The strange thing about it is, I using a…
MaTok
  • 353
  • 3
  • 16
14
votes
2 answers

/bin/sh: eval: line 98: bash: not found

i got this /bin/sh: eval: line 98: bash: not found message by executing the gitlabb .yml file. I added in the before script section the line - apk update && apk add openssh which was not helpful. before_script: - apk update && apk add openssh …
Detlef7able
  • 191
  • 1
  • 2
  • 12
14
votes
2 answers

How to remove/uninstall gitlab-runner completely from centos

My gitlab-runner service is not running no matter what I do. I used to have same problem before and when I used to update, and it used to start running but now it’s not starting at all. I have uninstalled and then again installed it’s still the…
MSA
  • 171
  • 1
  • 2
  • 7