Questions tagged [gitlab]

For questions about GitLab, an open source Git repository manager with issue tracking, wiki and continuous integration facilities.

52 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
2k views

Gitlab : Download artifacts from a job in another child pipeline

I want to download an Artifact in a job present in a Child pipeline from another job present in another Child pipeline part of the same parent-child pipeline hierarchy. I tried with the files below ...
  • 21
2 votes
1 answer
74 views

Can I create a pipeline stage which unconditionally passes but one in which a subsequent stage conditionally runs?

This is a follow up to Should a pipeline fail if early termination is desired?. In that question, I'm asking about best practices and whether this request is sound. In this, I just need to know how ...
2 votes
0 answers
822 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 ...
2 votes
1 answer
231 views

Gitlab pipeline + Jump host + execute HELM

What is worked: Steps: directly go to server via SSH (behind the JH) via SSH to another server pull from Artifactory for testing only executing HELM chart to pull from artifactory and deploy on k8s ...
2 votes
0 answers
362 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 (...
  • 121
2 votes
0 answers
475 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 ...
  • 21
1 vote
0 answers
15 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-...
  • 159
1 vote
0 answers
42 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 ...
1 vote
0 answers
54 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 ...
  • 111
1 vote
0 answers
52 views

How to manually specify variables for child pipeline in bridge job?

Right now i have this gitlab-ci.yml. stages: - Build - Deploy ... Deploy: stage: Deploy when: manual trigger: services/service1 variables: BUILD_NAME: "${BUILD_NAME}" ...
1 vote
0 answers
47 views

How to collect statistics from CI over time?

CI environments like GitLab (self-hostet and Cloud), GitHub, CodeCov, Codacy, ... collect statistics over time, so a developer or team lead can see the evolution of the project over time: number of ...
  • 111
1 vote
1 answer
43 views

Does GitLab support assigning a reviewer based on the contributor?

My company has the notion of a Senior Tier of developers. These developers are dispersed amongst development teams. Then we assign the Senior Developers from one team to assess the contribution from a ...
1 vote
1 answer
2k 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 ...
  • 123
1 vote
0 answers
159 views

How to get merge request stats using Git CLI command?

I needed to get the final stats on a sample Merge Request with multiple commits on it. I have tried pulling in git ls-remote origin 'refs/merge-requests/*/head' then trying to get insertion and ...
  • 21
1 vote
1 answer
879 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,...
  • 111
1 vote
3 answers
70 views

Automate starting and stopping of multiple containers on single production server

I am doing a project for my university where I have the following requirements: I want to start and stop (docker) containers with different apps I have a singe (university) server to my disposal I ...
1 vote
1 answer
81 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 ...
1 vote
0 answers
24 views

git-p4 rebase command fails when using "main" as the default git branch

I'm using the git-p4 script (doc reference, code reference) to drive some processes to synchronize code stored in Perforce Helix in to GitLab. It works fine for my needs, though now that GitLab ...
1 vote
0 answers
76 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 ...
1 vote
0 answers
263 views

Can Gitlab Auto DevOps provide an aws/dynamodb-local service without being customised?

I'm using an aws/dynamodb-local Docker container for use during local testing of my Node application and I'd like to integrate it with my Gitlab CI test job. I have made a rudimentary extension to ...
  • 111
1 vote
2 answers
645 views

GitLab CI/CD: How do I generate a change log between pipeline runs?

I'm currently using Gitlab CI/CD combined with Fastlane on our build machine to perform nightly builds of an iOS app, and push those builds to TestFlight on completion. So far, so good. However, I've ...
1 vote
1 answer
123 views

How to create a bot user for an organization in GitLab?

Background: In GitLab it is possible to create bot users for projects and for groups. A project bot can only access one project by using one access token and a group bot can only access the projects ...
  • 12.9k
0 votes
0 answers
8 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 ...
  • 3
0 votes
0 answers
9 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 ...
  • 201
0 votes
1 answer
54 views

Install gitlab on baremetal cluster using helm chart

I'm trying to install gitlab using helm on my kubernetes cluster running on vbox. I have already installed traeffik, metallb and argocd. I have tried to install gitlab using helm with this command: ...
0 votes
0 answers
22 views

Add a job to a Gitlab pipeline if a tools exit code is 0

I would like to add a job to a pipeline in Gitlab, but only if a tool, e.g. Maven, exits with exit code 0. For example, I would like to run the job for integration tests only if a given profile exists....
  • 103
0 votes
0 answers
19 views

How to access variables of a yaml file in gitlab-ci.yml file

How to access and use variables of one yaml file in gitla-ci.yml. Suppose here is my file: --- default: repo_name: deb-build package_name: abc destination: "/opt/bin" builds: ...
  • 1
0 votes
0 answers
6 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/...
  • 1
0 votes
0 answers
25 views

CICD AWS Secrets Manager - How to determine which secrets to inject?

I am working on implementing "secrets injection" on a GitLab CI pipeline. The secrets are stored on AWS Secrets Manager. The goal is to create a appsettings.json file containing the secrets ...
  • 171
0 votes
0 answers
19 views

Deploying files contains in a git repo to a docker container

I have a stack deployed using a docker-compose file. Some of the containers will need to retrieve and host files located in a git repo (gitlab), what is the best way to retrieve / copy files from the ...
  • 332
0 votes
0 answers
16 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 ...
  • 101
0 votes
0 answers
38 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 ...
0 votes
0 answers
74 views

What are some secure ways to run chown and chmod in a Gitlab Deployment script?

I'm working on a deployment script using GitLab that deploys some code to a Linux based server. I have a stage of deployment that needs to lock down permissions. What's the best approach for ...
0 votes
0 answers
12 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 ...
  • 3
0 votes
0 answers
90 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 ...
  • 1
0 votes
0 answers
44 views

Gitlab CI: How to plot test success rate over time?

I have a project with pipelines that upload junit results. For a given branch I want a chart of test success rate over time to know the overall trend of my project. I read the analytics documentation ...
0 votes
0 answers
253 views

Docker Container: Permission denied when trying to `mount --bind` docker `WORKDIR` to gitlabs `$CI_PROJECT_DIR`

In a Symfony project I have a Dockerfile for the webserver container and I want to use this container inside Gitlab-CI to access the app via Symfony panther which runs a browser inside the container. ...
0 votes
1 answer
45 views

Deployment with manual confirmation of each change

I am new to CI/CD and Gitlab. I have a Python project for parsing a LaTeX book to HTML and uploading those HTMLs to our online course platform. Without CI/CD my pipeline would look like this: Fix ...
0 votes
0 answers
103 views

Gitlab - having both Docker-in-Docker and npm during build stage

I'm building a nodejs app and need npm. On the other hand, I need Docker-in-Docker for building the image. I need both of them at the same time. No image contains both npm and dind, there is a ...
0 votes
1 answer
905 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 ...
0 votes
0 answers
29 views

Does GitLab support staged reviews?

In my company Merge Requests are staged. That is to say, we don't run the company procedures around MR in parallel. For example, on some pull requests we have a "Release Team" that has to ...
0 votes
0 answers
19 views

Error docker push to own gitlab server installed with omnibus on ubuntu vm with own domain

I set up my own gitlab server on ubuntu vm and I also bought domain from godaddy and link with a record. I can login into registry but cannot push image to gitlab default container registry. My vm ...
0 votes
0 answers
26 views

Update to latest patch release using docker-compose

I would like to update gitlab automatically. Our docker-compose.yaml file looks like this: web: image: 'gitlab/gitlab-ee:latest' restart: always hostname: 'example.com' environment: ...
0 votes
0 answers
27 views

load list to pod running redis, from external source

I have a job which is running redis pod.: apiVersion: batch/v1 kind: Job metadata: name: redis-job spec: parallelism: 1 ttlSecondsAfterFinished: 10 template: metadata: name: redis-...
0 votes
0 answers
366 views

Gitlab pipeline failing to checkout repository

I am running a gitlab CI pipeline with the following .yml file: image: buildtools2019 stages: - build build-job: stage: build script: - echo "Starting to build the project" - ...
0 votes
1 answer
113 views

docker command substitution fails on gitlab

I am trying to run the following command as part of a deployment in Gitlab. TIMESTAMP=$(date +%s) docker stack deploy --with-registry-auth --compose-file $(`printf "docker-compose.%s.unimark.yaml&...
  • 139
0 votes
0 answers
521 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 ...
0 votes
0 answers
25 views

How can I separate code build from container build for MRs?

I'd really like to optimize our CI builds. Currently every time I push a code change to an MR our gitlab runners a 20-to-40 minute job to build our docker image which is ~8 GB. My understanding is ...
0 votes
0 answers
710 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} ...
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... ...