Questions tagged [gitlab-ci-runner]

GitLab Runner is the open source project that is used to run your jobs and send the results back to GitLab. It is used in conjunction with GitLab CI, the open-source continuous integration service included with GitLab that coordinates the jobs.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Running DinD or similar setup in k8s 1.24+ for unit tests during CI flow

Recently, we switched from Jenkins CI to GitLab-CI on K8s 1.24 with containerd. The Java applications we have contains unit tests / integration tests which would spin up some containers (for the likes ...
TheNormalGuy's user avatar
0 votes
1 answer
20 views

GitLab CI: How to properly push file to a repo using ci file?

I'm trying to setup a GitLab CI pipeline which runs a script (convert-inventory-format.sh) that update a yaml file. I would then like to commit that file to a Git repository and push it. However, the ...
DiklaS's user avatar
  • 1
0 votes
0 answers
22 views

gitlab runner shell executor docker cache seems to be cleared after restarting systemd gitlab-runner unit

I am using docker with the shell executor (https://docs.gitlab.com/runner/executors/shell.html) in order to more effectively cache docker images being built. I ran into an issue where after cancelling ...
Chris Stryczynski's user avatar
0 votes
0 answers
5 views

how to reuse merge request pipeline coverage to be used in default branch pipeline by not collecting coverage again on default branch after mergingPR?

I have to run the code coverage pipeline again after merging the PR because, in the merge request, it shows diff code coverage from the default branch and I do not want to run the code coverage ...
ironman3245's user avatar
0 votes
1 answer
278 views

How to wait for gitlab downstream pipelines to finish before going to next stage?

I'm not sure this is the way to proceed, but I'm starting using downstream pipelines. I have 3 projects : Project A : web-frontend-1 Project B : web-frontend-2 Project C : global-e2e-testing I'm ...
Lionep's user avatar
  • 113
0 votes
0 answers
15 views

How to run pytorch on gitlab-runner via docker?

I am learning gitlab ci/cd with a AI/Deep learning application in mind. But I wasn't sure how pytorch could be used in a gitlab-runner. According to documentation: The following multi-platform Docker ...
tinlyx's user avatar
  • 111
0 votes
1 answer
365 views

Gitlab runner tons of errors when trying to use shell executor

I installed the runners using the docker executor, but then later realized I actually needed the shell executor for layer caching... However now I just keep running into so many errors trying to get ...
Chris Stryczynski's user avatar
0 votes
1 answer
324 views

Gitlab Runner setup issues on Mac Mini with M2 processor

I have a pair of Mac Minis with M2 processors that I am trying to setup as runners on a locally hosted gitlab setup. For a variety of other systems I simply followed the instructions on the runners ...
Sqeaky's user avatar
  • 101
0 votes
0 answers
43 views

Is it possible to declare variables in a YAML file and to recover those variables in the .gitlab-ci.yml and use them in a matrix job?

I am configuring a Gitlab C/I that will trigger several child pipelines in another project. Each one of the child projects and pipelines needs two variables (foo and bar) and I want to trigger them in ...
Admineral's user avatar
0 votes
0 answers
49 views

From a gitlab docker runner, How to inject a command into the stdin of another running docker?

From a gitlab docker runner, I would like to inject a command into the stdin of another docker running on the same docker daemon. The docker daemon socket is mounted into the gitlab runner and works ...
djoproject's user avatar
0 votes
0 answers
20 views

How to trigger pipeline if any 1 of x repos is merged to main branch

I am using a locally hosted version of GitLab Omnibus, and I stay up to date with the most current versions. Here's an example of what I'm trying to do. I have five repositories. They are not in the ...
trueCamelType's user avatar
0 votes
1 answer
19 views

Are webhooks needed in Gitlab for triggering a build on tags push

I would like to trigger a Build on Gitlab when a Git Tag is pushed to the repository. At the same time I would like to increment the version number on a file located on the repository before building ...
Claudio Ferraro's user avatar
1 vote
0 answers
61 views

Why is my Gitlab shell executor only returning "0 0"?

All the sudden my self-hosted runner set to use the shell executor started returning "0 0" which is causing the pipeline to incorrectly "succeed" at every step without executing ...
kriipke's user avatar
  • 11
1 vote
1 answer
5k views

GitLab CI runner: remote: You are not allowed to download code from this project

Inside of one of my runner's logs, when I try to replay it, I'm getting the following error, Reinitialized existing Git repository in /builds/users/repo/.git/ remote: You are not allowed to download ...
Evan Carroll's user avatar
  • 1,524
0 votes
1 answer
403 views

When running terraform from Gitlab CI, terraform asks me for the "The address of the REST endpoint"

When I run terraform apply using the Terraform files in my GitLab CI Pipeline (I didn't write them) I get the following, Initializing the backend... address The address of the REST endpoint Can ...
Evan Carroll's user avatar
  • 1,524
0 votes
0 answers
456 views

gitlab runner storage full

I've my own gitlab runners with docker executors. After a month Ive found that the storage is almost full on all runners due to runner cache. Mostly docker volumes taking all space. I've tried ...
Alan's user avatar
  • 23
0 votes
0 answers
42 views

Base image for GitLab Kubernetes executor

I'd like to use Kubernetes executor for GitLab Runner. What is the recommended base image for such an executor's image? I'd expect this GitLab Kubernetes executor's container to connect to GitLab ...
rok's user avatar
  • 241
0 votes
2 answers
539 views

Building a docker container in a gitlab ci job

I am trying to build a docker image as part of a gitlab ci job. I work on my own gitlab instance with a separate machine running ci jobs. I have tried and failed with many different configurations for ...
Henrik's user avatar
  • 3
0 votes
0 answers
56 views

Gitlab-ci: Unable to read file deb: unsupported tar compression in deb: control.tar.zst

I am new to gitlab-ci and learning it. I am trying to push my deb package on remote server. I am able to do it when I am running individual commands mentioned in gitlab-ci.yml manually in ubunty/...
Thor's user avatar
  • 1
1 vote
0 answers
195 views

GitLab templating: Multiple default before_script blocks

This doesn't work correctly: template1.yml default: before_script: - echo "hello from one" template2.yml default: before_script: - echo "hello from two" .gitlab-...
Richard's user avatar
  • 159
0 votes
0 answers
54 views

Best approach for setting up a Selenium test environment using Gitlab CI/CD pipeline

My current idea I’m setting up an infrastructure for a small team that contains a CI/CD pipeline, which runs using Gitlab-runner on an VPS Server which runs Ubuntu. The runner builds and tests PHP ...
Kafune's user avatar
  • 1
0 votes
0 answers
59 views

Gitlab pipeline leak other project sources

At work we are exploring the capabilities of GitLab CI/CD in a private instance and we are concerned with one special case: suppose we have a project with a .gitlab-ci.yml file. Is it right that any ...
ArenaLor's user avatar
  • 101
1 vote
0 answers
124 views

Gitlab Runner becomes stuck on docker login

I installed GitLab runner via HelmChart on my Kubernetes cluster. While installing via helm I used config values.yaml. But my Runner becomes stuck every time at docker login command, without docker ...
User82949B's user avatar
1 vote
0 answers
114 views

How to set GitLab runner on k8s executor Docker not Kubernetes

I'm trying to set GitLab runner on k8s and I want to change the default executer "Kubernetes to "Docker" I installed GitLab runner via HelmChart While installing via helm I used config ...
Shukurillo Baikhanov's user avatar
0 votes
0 answers
97 views

How do I associate a git branch to a kubernetes namespace?

Say I want to map git branches to k8s namespaces, like this: master branch -> prd namespace devel branch -> dev namespace for my Gitlab CI pipeline to deploy helm charts to the right ...
emivespa's user avatar
0 votes
0 answers
21 views

Why does my merge job always end with everything up-to-date?

I want to merge dev and master branch every midnight and create a logfile of the application date wise. i.e dev-app-dd-mm-yy.log or master-app-dd-mm-yy.log. My app is running on docker and ci is done ...
Alan's user avatar
  • 23
0 votes
0 answers
146 views

How to run several gitlab-runners in one docker-compose-setup

I'm running 10 runners on one server with docker-compose. Sometimes the pipeline failes with errors like this: fatal: Unable to create '/builds/xxx.de/xxx.de/.git/index.lock': File exists. Another git ...
Anton's user avatar
  • 1
0 votes
2 answers
3k views

gitlab-runner docker: command not found

I'm trying to build docker container using GitLab runner. (lead dev left company, and now I have no idea how to do it.) I'll share everything I can. Build output as I understand from output runner is ...
Andronik Nazaryan's user avatar
1 vote
0 answers
237 views

Gitlab CI building dotnet core project with WPF reference

For a CI Project, I am using Gitlabs pipelines to build and create nuget packages. I am using the following docker image image: mcr.microsoft.com/dotnet/core/sdk:3.1 which works for most of my ...
Simon's user avatar
  • 111
0 votes
1 answer
760 views

GitLab tag removal through the web interface does not actually remove the tag from Git

When I hit the delete button in the Tags interface I can verify the tag does not show, but when semantic-release tries to run, I still git tag on the runner I still get fatal: tag 'v5.2.3' already ...
Evan Carroll's user avatar
  • 1,524
0 votes
1 answer
3k views

gitlab project registry - docker push fails with invalid reference format error message

I have create a personal access token for my project. in my gitlab-ci.yml I'm trying to create a docker image and then save it in my project's repository. I'm able to login - I see an explicit ...
dot's user avatar
  • 115
3 votes
2 answers
4k views

What regex engine does GitLab use?

Let's say I have a rule like this, - if: '$CI_COMMIT_TITLE =~ /^(fix|feat|perf|docs|build|test|ci|refactor)\S*:/' It occurs to me that ^ does not match the start of any line in a multiline regex, ...
Evan Carroll's user avatar
  • 1,524
1 vote
0 answers
715 views

Checking pipeline status stuck

I have installed gitlab-runner into a container, and made it register. I got a runner with the green light into my gitlab.private.com open but seems that the Checking pipeline status is stuck and ...
Zemmouri Tarek's user avatar
1 vote
1 answer
3k views

How to run a gitlab child pipeline only on changes in merge requests?

According to the documentation, parent-child pipelines should work well with rules - so i'm trying to setup a parent-child pipeline, where the child pipelines only run when something has actually ...
pulse00's user avatar
  • 123
0 votes
1 answer
401 views

Docker build from gitlab pipeline

I do have the following "shared.gitlab-ci.yml" variables: GIT_SUBMODULE_STRATEGY: recursive DOCKERFILE_BUILD: docker/build/Dockerfile DOCKERFILE_TEST: docker/test/Dockerfile ...
Pwnstar's user avatar
  • 103
1 vote
0 answers
743 views

python `subprocess.run()` returning unexpected empty stdout in gitlab-ci

I'm attempting to have my python blackbox test suite run through gitlab-ci. When running the test through pipenv run pytest on my personal machine everything executes correctly, but when running on ...
Non _'s user avatar
  • 11
1 vote
1 answer
810 views

Test reports for Gitlab CI when multiple modules exist

I am trying to setup build scripts for Gitlab CI for a Java/ project with Gradle. The project has three different modules A, B and C, with modules B and C being dependent on the module A. All three ...
Petre Popescu's user avatar
1 vote
1 answer
2k views

How to caching the docker images?

I try to improve the performance of my pipeline stages in gitlab cicd. The Gitlab is self hosted and the Runner runs as docker with docker executor. I recognized, that for both jobs in my stages (test,...
MaKaNu's user avatar
  • 111
2 votes
1 answer
72 views

CI pipeline including upload to pypi repo

How should a ci pipeline be set up that publishes a python wheel to a private pypi server? Say I have a publish job like this one: publish: image: $PYTHON_IMAGE stage: publish before_script: ...
plazmakeks's user avatar
0 votes
0 answers
1k views

Cant access gitlab ci variables from inside python script building with maven

I have a python project which I build using maven. In my .gitlab-ci.yaml file I set some global variables. variables: MAVEN_BASE_CLI_OPTS: "" MAVEN_CLI_OPTS: ${MAVEN_BASE_CLI_OPTS} ...
Sangathamilan Ravichandran's user avatar
3 votes
0 answers
1k views

Share cache between gitlab.com owned runner and self hosted runner

We are in the middle of migrating from Self Hosted GitLab to Gitlab.com (Cloud). This also means that we are shifting building through shell, to building through Docker (using Kaniko). A summary of ...
Jordi Kroon's user avatar
0 votes
1 answer
42 views

how to deploy same job on all my runners?

I have several VMs running gilab-runner, and I'm using gitlab-ci to deploy microservices into those VMs. Now I want to monitore those VMs with prometheus and grafana, but i need to setup node-exporter/...
Charles Bao's user avatar
1 vote
1 answer
185 views

Gitlab (self hosted gitlab) pipeline fail when trying to fetch repository

I've setup own gitlab server on AWS EC2 Instance based on this image - https://aws.amazon.com/marketplace/pp/prodview-w6ykryurkesjq?ref_=aws-mp-console-subscription-detail and assign Elastic IP for ...
Marcin Warzybok's user avatar
3 votes
1 answer
533 views

Do GitLab Runner worker nodes need to have network access to GitLab?

GitLab runner has an autoscale feature that allows the Runner Manager to dynamically spawn new worker nodes on demand. The documentation says that: "GitLab Runner is going to need to talk to your ...
Moritz's user avatar
  • 141
2 votes
0 answers
484 views

Pipeline could not pull repo in GitLab CI/CD

I have a the repo with test CI pipeline, which is the following: # .gitlab-ci.yml image: name: gcc build: stage: build script: - echo 123 And it fails: Running with gitlab-runner 14.3.1 (...
Ivan's user avatar
  • 121
0 votes
0 answers
2k views

Gitlab runner fails with connection timeout , connectivity works fine

Same question was asked by myself before. But now I registered runner with sudo. Yet I get following error in pipeline Getting source from Git repository Fetching changes with git depth set to 50... ...
Sachith Muhandiram's user avatar
2 votes
0 answers
714 views

GitLab CI/CD get CI_MERGE_REQUEST_LABELS after merge successfully

I know that the docs say, that the variable CI_MERGE_REQUEST_LABELS is available if pipeline is a merge request pipeline and the MR is open. My dream was it to label my MR's with patch, minor or major ...
Neneil's user avatar
  • 21
1 vote
0 answers
115 views

gitlab ci: How to share cache between fork and parent repository?

first please read the context of my inquiry. A project named teamspace/foo I maintain at work makes each teammate fork it. I have a scheduled pipeline that remakes cache each night. Now onto the ...
John Doe's user avatar
2 votes
1 answer
1k views

New Runners are locked and the checkbox to unlock them is disabled

I'm running the latest version of on-prem GitLab (version 14.1.0-ee). The last few new GitLab runners I've added show up as locked. I open the runners config in the WebUI and I see that the "Lock ...
James T Snell's user avatar
0 votes
3 answers
945 views

Do I have to include gitlab variables in my terraform code in order for my credentials to be recognized?

I am trying to set up a pipeline, which is supposed to deploy terraform code into an aws account. The code works fine locally, and I have setup and imported the state bucket and dynamodb table which ...
Lucky's user avatar
  • 141