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
213
votes
8 answers

This job is stuck, because the project doesn't have any runners online assigned to it. Go to Runners page

I am learning GitLab CI/CD. I installed GitLab and GitLab Runner from Officials. Whenever I run the pipeline during Maven build, the job gets stuck. I have a registered runner and it is available to my project, but jobs get…
Navigator
  • 2,871
  • 4
  • 17
  • 27
139
votes
5 answers

Multiline YAML string for GitLab CI (.gitlab-ci.yml)

I'm trying to write a gitlab-ci.yml file which uses a multi-line string for the command. However, it seems like it is not being parsed. I've tried both the - | and - > with identical results. stages: - mystage Build: stage: mystage script: …
samanime
  • 25,408
  • 15
  • 90
  • 139
109
votes
11 answers

How to run a gitlab-ci.yml job only on a tagged branch?

How do I run a .gitlab-ci.yml job only on a tagged Master branch? job: script: - echo "Do something" only: - master - tags The above code will run if either condition exists: a Master branch or a tagged commit. My goal is to have this…
Carson Cole
  • 4,183
  • 6
  • 25
  • 35
95
votes
8 answers

How to enable maven artifact caching for GitLab CI runner?

We use GitLab CI with shared runners to do our continuous integration. For each build, the runner downloads tons of maven artifacts. Is there a way to configure GitLab CI to cache those artifacts so we can speed up the building process by preventing…
helt
  • 4,925
  • 3
  • 35
  • 54
84
votes
3 answers

Gitlab CI/CD job's log exceeded limit

When I run my job on Gitlab CI/CD, after a while I obtain the following error message: Job's log exceeded limit of 4194304 bytes. How to change this limit?
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
68
votes
5 answers

Docker : exec /usr/bin/sh: exec format error

I created a custom docker image and push it to docker hub but when I run it in CI/CD it gives me this error. exec /usr/bin/sh: exec format error Where : Dockerfile FROM ubuntu:20.04 RUN apt-get update RUN apt-get install -y…
rkevx21
  • 2,441
  • 5
  • 19
  • 40
68
votes
12 answers

Getting GitLab CI to clone private repositories

I have GitLab & GitLab CI set up to host and test some of my private repos. For my composer modules under this system, I have Satis set up to resolve my private packages. Obviously these private packages require an ssh key to clone them, and I have…
danbroooks
  • 2,712
  • 5
  • 21
  • 43
58
votes
2 answers

How to override global before_script with empty before_script in job

Is it possible to override the global before_script with an empty before_script within a job?
Alexander Herold
  • 1,057
  • 2
  • 9
  • 20
55
votes
7 answers

Change Gitlab CI Runner user

Currently when I start a build in GitlabCI it is running under gitlab-runner user. I want to change it the company's internal user. I didn't find any parameter to the /etc/gitlab-runner/config.toml which is solve that. My current configuration:…
PumpkinSeed
  • 2,945
  • 9
  • 36
  • 62
53
votes
2 answers

How to fail a build on Gitlab CI shell runner

I have a Gitlab CI runner running on windows 10: before_script: - "echo off" - 'call "%VS120COMNTOOLS%\vsvars32.bat"' - echo. - set - echo. stages: - build build: stage: build script: - 'StatusTest.exe' #- msbuild... I am…
Vojtech B
  • 2,837
  • 7
  • 31
  • 59
51
votes
1 answer

How gitlab runner concurrency works?

Q1: Whats the difference between concurrent = 3 [[runners]] .. executor = "shell" and concurrent = 3 [[runners]] ... executor = "shell" [[runners]] ... executor = "shell" [[runners]] ... executor = "shell" Q2: Does it makes…
Slimer
  • 1,123
  • 2
  • 10
  • 22
49
votes
12 answers

GitLab Checking pipeline status - running forever

I've enabled the option - Settings/General/Merge Requests/Merge Checks - Pipelines must succeed. Since then every merge requests automatically starts execution of the pipeline which is actually what i want. The problem is that this is running…
Harry Birimirski
  • 858
  • 1
  • 8
  • 21
48
votes
11 answers

How to delete gitlab CI jobs pipelines logs/builds and history

How can we configure gitlab to keep only the last 10 CI jobs/builds and keep deleting the rest? For example , in Jenkins , we can configure the job to keep only last X builds.
Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73
47
votes
2 answers

Gitlab CI + DinD + MySQL services permission issue

I created two GitLab jobs: Test unit (using a PHP registered docker on GitLab) Sonar (using docker service to run "Letsdeal/docker-sonar-scanner") I use the following gitlab-ci-multi-runner configuration: concurrent = 1 check_interval =…
Bruno Maurice
  • 599
  • 3
  • 9
43
votes
5 answers

Cannot push from gitlab-ci.yml

With my colleagues, we work on a C++ library that becomes more and more important each day. We already built continuous integration utilities through the gitlab-ci.yml file that let us: Build & Test in Debug mode Build & Test in Release…
baptiste
  • 1,107
  • 2
  • 15
  • 30
1
2 3
99 100