Questions tagged [gitlab]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
15 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}" ...
0 votes
0 answers
10 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
12 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
12 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
40 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
0 answers
20 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 ...
  • 101
0 votes
1 answer
27 views

Deployment with manual confirmation of each change

I am new to CI/CD and gitlab. I have a python project for parsing latex book to html and uploading those htmls to online course platform. Without CI/CD my pipeline would look like this: Fix latex ...
0 votes
0 answers
28 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
0 answers
251 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
1 answer
50 views

Setting up gitlab phpstan pipeline

I have tried to start using phpstan pipeline on gitlab according to this guide. The problem is that the pipeline does not work at all (Command 'sh' is not defined) and i don't know how to fix it. Here ...
  • 103
1 vote
1 answer
14 views

GitLab "Groups" for permissions only?

I have a many repos all of which can be edited by a different "Senior Review Group" group. I've detailed this idea here. Should I use the GitLab Group functionality to assign reviewers are ...
0 votes
0 answers
27 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 ...
1 vote
1 answer
40 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 ...
0 votes
0 answers
16 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
1 answer
18 views

Server-side Gitlab URL rewriting?

Our old BitBucket server had a URL like this, https://bitbucket.acme.net/scm/acmegroup/acme-project.git And, we're wanting to move to GitLab with a DNS switch which has a different URL-convention ...
0 votes
1 answer
823 views

GitLab Container Registry: errors: denied: requested access to the resource is denied [...] error parsing HTTP 401 response body

When I run podman push (the equiv of docker push) to get my image up to GitLab's container registry, I'm getting the following error. errors: denied: requested access to the resource is denied [...] ...
0 votes
0 answers
22 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
13 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
173 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" - ...
1 vote
1 answer
283 views

gitlab container registry: how to test that it's set up and working?

I'm trying to push for the first time to a gitlab project container registry. I am not a gitlab administrator so I can't change global settings. But as far as my project is concerned I've made sure ...
  • 115
0 votes
1 answer
180 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 ...
0 votes
1 answer
721 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 ...
  • 115
1 vote
1 answer
677 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, ...
0 votes
1 answer
57 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
1 vote
0 answers
979 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 ...
  • 11
0 votes
0 answers
325 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 ...
1 vote
1 answer
857 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
88 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
62 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 ...
1 vote
1 answer
31 views

Should a pipeline fail if early termination is desired?

Normally a pipeline breaks down into stages such that each stage has one or more jobs. In order to stop the pipeline from running conditionally, you simply fail that stage of the pipeline. For ...
0 votes
1 answer
179 views

What happens when two jobs produce artifacts with conflicting locations?

In my GitLab CI log I pipeline with three stages build creates a distribution semantic-release which bumps the version publish The problem occurs in publish. Sometimes I see the version unbumped. ...
1 vote
1 answer
237 views

How to get all open Merge Requests using git command line?

I need to get all open Merge requests by author and if possible within a time frame. Tried using this command for Github where it works fine - git ls-remote origin 'pull/*/head' But in gitlab, this ...
  • 21
0 votes
1 answer
95 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 ...
  • 103
1 vote
1 answer
121 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 ...
1 vote
1 answer
432 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
5 votes
1 answer
210 views

How to test the CI/CD pipeline itself?

I have gitlab CI/CD defined through .gitlab-ci.yml. It runs different jobs if the pipeline is triggered manually, from a merge request or from a scheduled pipeline. It accepts a bunch of environment ...
0 votes
0 answers
23 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
9 views

Excluding tests from repository downloaded by users?

I am currently helping maintain a python code base using GitLab. Recently, I have introduced integration testing using a pipeline in the development branch. Unfortunately, the test directory is quite ...
  • 101
0 votes
0 answers
367 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
53 views

What is the difference between `gitlab-runner start` and `gitlab-runner run`? What is the purpose of `run`?

What is the difference between gitlab-runner start and gitlab-runner run? The documentation is not very clear on this: gitlab-runner run This is main command that is executed when GitLab Runner is ...
  • 101
0 votes
0 answers
19 views

Storing the path of changed items in a variable for gitlab CICD

We have a repo with a structure as below (simplified): Root |- vars | |- hostNameX | |- hostVarsForAnsible |- ... We want our pipeline to trigger only when changes are made within /vars/* (...
  • 153
0 votes
0 answers
12 views

Question about Jenkins deployment based on .NET Projects

So I was tasked to automate the build/deployment process for our projects and since the project stucure is rather unique, I would like to ask if an automation is even possible in my case. The project ...
  • 1
1 vote
1 answer
189 views

Is it a good practice to run unit tests inside build job in Gitlab CI?

We want to run unit tests against a built Docker image and not by installing the environment inside Gitlab CI runner We don't want to push the docker image to a registry and pull it back in a test job ...
4 votes
1 answer
921 views

Colored logging messages from Python script within GitLab CI

I am using a docker container for my GitLab CI and would like to have any output/logging messages in color inside the CI. What I mean: the commands from .gitlab-ci.yml are in color, but the outputs of ...
2 votes
0 answers
603 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 ...
0 votes
1 answer
377 views

Deploying microservices in a consistent way using different gitlab repositories

I'm looking for a good organization to deploy our solution consisting in multiple apps using Gitlab and K8S. Our SaaS app that is made of : A backend app, mostly our API (django) A user app (React) ...
  • 103
0 votes
1 answer
485 views

Trying to run a simple API GET request for private Gitlab account

I am trying to run a simple API request to GitLab through powershell 5.1. After generating an access token with all privileges using the Web UI I tried to run the following: invoke-restmethod https://...
  • 101
0 votes
2 answers
649 views

Git keeps asking for ssh passphrase when SSH is already defined in GitLab

I'm playing around with a personal GitLab account to get familiar with its' ins and outs. First, I followed this primer on setting ssh keys and added public and private ED25519 keys to ~\.ssh. I added ...
  • 101
0 votes
2 answers
59 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 ...
0 votes
0 answers
97 views

Gitlab Parent-Child pipeline: using branches in the parent pipeline repository for new feature implementations

Environment: Parent-child pipeline branch off of main. Branch: testBranch Expected functioning config name: .scan.yml:refs/testBranch@url/scanPipeline Working config name (this uses the default master/...
  • 101

1
2 3 4 5