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
0 votes
1 answer
18 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 [...] ...
user avatar
0 votes
0 answers
15 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: ...
user avatar
0 votes
0 answers
8 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-...
user avatar
0 votes
0 answers
26 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" - ...
user avatar
1 vote
1 answer
28 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 ...
user avatar
  • 115
0 votes
1 answer
12 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 ...
user avatar
0 votes
1 answer
44 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 ...
user avatar
  • 115
1 vote
1 answer
15 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, ...
user avatar
0 votes
1 answer
16 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&...
user avatar
  • 139
1 vote
0 answers
122 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 ...
user avatar
  • 11
0 votes
0 answers
33 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 ...
user avatar
1 vote
1 answer
126 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 ...
user avatar
  • 123
1 vote
0 answers
38 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 ...
user avatar
  • 21
1 vote
1 answer
27 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 ...
user avatar
1 vote
1 answer
16 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 ...
user avatar
0 votes
1 answer
26 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. ...
user avatar
1 vote
1 answer
46 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 ...
user avatar
  • 21
0 votes
1 answer
48 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 ...
user avatar
  • 103
1 vote
1 answer
28 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 ...
user avatar
1 vote
1 answer
76 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,...
user avatar
  • 111
5 votes
1 answer
82 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 ...
user avatar
0 votes
0 answers
17 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 ...
user avatar
0 votes
0 answers
7 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 ...
user avatar
  • 101
0 votes
0 answers
108 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} ...
user avatar
0 votes
0 answers
22 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 ...
user avatar
  • 101
0 votes
0 answers
15 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/* (...
user avatar
  • 153
0 votes
0 answers
11 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 ...
user avatar
  • 1
1 vote
1 answer
88 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 ...
user avatar
3 votes
1 answer
450 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 ...
user avatar
2 votes
0 answers
331 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 ...
user avatar
0 votes
1 answer
146 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) ...
user avatar
  • 103
0 votes
1 answer
211 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://...
user avatar
  • 101
0 votes
2 answers
204 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 ...
user avatar
  • 101
0 votes
2 answers
50 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 ...
user avatar
0 votes
0 answers
65 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/...
user avatar
  • 101
0 votes
0 answers
25 views

Gitlab: Run CI when a dependency is updated (on pypi or on its master branch)

I am managing a gitlab repo which has as dependencies two packages which are also hosted on gitlab, and on pip. As part of my CI pipeline, I install the latest version of these dependencies from pypi (...
user avatar
0 votes
0 answers
56 views

Jenkins Gitlab integration Client error: Remote host terminated the handshake

I have installed Jenkins version 2.303.2 in RHEL and installed gitlab plugin in it. From the Jenkins server I can telnet to gitlab server but when I try to configure gitlab in Jenkins UI, it gives ...
user avatar
  • 101
0 votes
0 answers
63 views

gitlab pipeline: cannot pass $CI_REPOSITORY_URL to downstream pipeline

I have a job in a cicd pipeline which needs to start a pipeline in a different project and reference the calling project. I have created a job like this: deploy: variables: PROJECTURL: $...
user avatar
  • 101
2 votes
1 answer
88 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 ...
user avatar
0 votes
0 answers
55 views

Gitlab - Sonarqube integration fails

We have gitlab and sonarcube installed in two servers and try integrate sonarcube to gitlab. We had successfully added required token and parameters. When we try to access sonarcube using gitlab ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
2 votes
1 answer
111 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 ...
user avatar
  • 121
2 votes
0 answers
263 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 (...
user avatar
  • 121
0 votes
0 answers
1k 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... ...
user avatar
1 vote
2 answers
55 views

How to track deployments of multiple interconnected repositories

We are working with a ERP system (called Odoo, but that does not matter so much). It consists of many building blocks. Some of this modules/addons are dependent on others, some are standalone, but ...
user avatar
  • 111
1 vote
1 answer
49 views

Parametrize gitlab ci pipeline

There is the following simple pipeline: build → test → deploy that uses specified python version for all stages, for example 3.8. How can I scale (parametrize) it for python with versions: 3.7, 3.8 ...
user avatar
  • 11
1 vote
0 answers
219 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 ...
user avatar
  • 11
0 votes
1 answer
48 views

GitLab variable false but job is running

I'm triggering job via API, passing custom variables. Here is example request: curl -X POST -F token=${TRIGGER_TOKEN} -F ref=${branch} -F "variables[SHOULD_COPY_ASSETS]=false" This how job ...
user avatar
2 votes
1 answer
255 views

Where does the string docker.example.com in my GitLab CI job come from?

I am trying to have a Docker image deployed to my server by GitLab CI, but it only worked once¹ and then dies with the error message below. Here is the .gitlab-ci.yml snippet: deploy-image: image: ...
user avatar
  • 315
1 vote
0 answers
21 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 ...
user avatar