18,387 questions
0
votes
1
answer
57
views
Create gitlab merge request for project A while in project B
Let's say you have the following setup in gitlab:
Gitlab Group Developments, of which there is a Subgroup Subgroup, which in turn contains Template project X which provides a general structure for ...
Best practices
0
votes
0
replies
31
views
Gitlab show result from multiple pipelines on Merge Request page
We aare developing new features for our code which we use merge requests in Gitlab to a release branch where all features are collected. When doing the actual release we do a MR from release branch to ...
1
vote
1
answer
112
views
Running a tool with uvx from a private repo using an access token
I want to frequently test a Python application I'm developing with uv, which I publish to a private repository on a GitLab instance. I've generated an access token with read access to the repo and I ...
0
votes
0
answers
33
views
Merge conflict with GitLab Web IDE
I'm editing a file in a merge request in GitLab's Web IDE. While I'm working, someone else commits changes to the same file, which creates a merge conflict. When I'm ready to commit my changes, GitLab ...
0
votes
0
answers
45
views
Accessing to two or more Gitlab Projects in the same Jenkins pipeline file
We have the following Jenkins pipeline script.
pipeline {
agent any
stages {
stage('Run in Sandbox'){
steps {
dir('Pot') {
checkout ...
Advice
0
votes
2
replies
43
views
How to replicate locally automated API tests within gitlab CI
Let's say you have a repository in gitlab. For facilitated distribution of the application and according development throughout a team, you convert the app into a Docker Container, which can be ...
Advice
1
vote
3
replies
90
views
How to make `git branch --show-current` work on GitLab?
There are several questions on stack overflow asking how to get the current branch name on GitLab. The interwebz are full of countless variations of that same question. The answer that is always ...
Best practices
1
vote
3
replies
81
views
How to update git submodule with latest commit automatically in remote
I have a project named sample which have 2 submodules sampleA and sampleB. I also have another git repo named Example which also refers to same submodule sampleA and sampleB. When I change something ...
Best practices
1
vote
1
replies
47
views
Fast and auto scalable gitlab runner
i've a question. We were using Gitlab's Instance runners but for security reasons, we wanna move it to private runner. I tried using ec2 as runner but it can't scale and is so slow for concurrent runs....
0
votes
0
answers
66
views
How to map user contributions after move from GitLab to GitHub?
I just successfully moved a project from GitLab to GitHub. Our entire team have accounts on both platforms and everyone has read/write access to the new GitHub project.
For some contributors, GitHub ...
0
votes
0
answers
26
views
Modify extended job variable on the fly through script
I have the following jobs:
.build-image:
extends: .build-docker-image
stage: build
variables:
COMPOSER_HOME_DIR: /kaniko/.composer
BUILD_ARGS: >
COMPOSER_HOME=${...
0
votes
0
answers
99
views
Git clone failed on Windows but works fine on Mac
I am trying to git clone a GitLab repository using HTTPS on my Windows Laptop. HTTPS is the only protocol supported. It failed with the following error:
remote: Enumerating objects: 202266, done.
...
1
vote
2
answers
100
views
Permission denied when pushing to a forked repository (403 error on GitHub)
I forked a GitHub repository from my friend’s account, but when I try to push my commits, I get this error:
remote: Permission to Fatima-Ennouari/test.git denied to Ridafadli.
fatal: unable to access ...
0
votes
1
answer
42
views
GitLab Docker component usage
I'm trying to build a GitLab pipeline that calls a Docker component and does the Docker build, scan, and push automatically.
My pipeline structure is as below.
default:
tags:
- eks-lnx-prd
...
0
votes
0
answers
36
views
Make gitlab pipeline conditional on being the pipeline before the merge train one
I have a Gitlab pipeline that has a number of (expensive) steps, which I normally want to be manual and allowed-to-fail, but I want them to run and to succeed when the branch is actually being merged. ...
0
votes
1
answer
142
views
ArgoCD “ssh: handshake failed... connection reset by peer” when connecting to GitLab via SSH
I’m trying to connect ArgoCD to a private GitLab repository using SSH.
I created a key pair and added the public key to GitLab.
Then I configured the private key and repository URL ([email protected]....
0
votes
0
answers
32
views
GitLab CE self hosted is changing my group users
I have a self hosted GitLab CE for a project management team.
I have created a Group with 1 owner and 2 maintainers, and this group is linked to 3 different projects. So the group should be:
owner (...
0
votes
0
answers
33
views
GitLab CI/CD pipeline Salesforce code coverage test
I'm currently building a CI/CD pipeline in GitLab, and I'm running into trouble with integrating a code coverage check.
What I’ve Got So Far:
A working GitLab Runner (on Windows).
An Apex class and a ...
2
votes
1
answer
98
views
GitLab input values based on branch, like variables
My GitLab 18 instance is suggesting me to use inputs instead of variables;
Using inputs to control pipeline behavior offers improved security and flexibility. Consider updating your pipelines to use ...
0
votes
0
answers
32
views
GitLab on Ubuntu: Browser always redirects http://git.brian.dev to https://git.brian.dev
I’m configuring a self-hosted GitLab server on my laptop (Ubuntu).
My Wi-Fi IP is 192.168.x.x.
I added this line in /etc/hosts:
192.168.x.x git.brian.dev
In GitLab configuration (/etc/gitlab/gitlab....
0
votes
1
answer
80
views
Cloud Native Buildpacks unprivileged lifecycle with bellsoft-liberica buildpack BP_JVM_TYPE JDK builds JRE-configured run image instead of JDK
In our GitLab Pipeline we use Cloud Native Buildpacks (CNB) with the Kubernetes executor & unprivileged Runners (without pack CLI & docker) as discribed in this so answer.
Additionally to the ...
1
vote
1
answer
137
views
How to pull images from AWS ECR via pull through cache in .gitlab-ci
I'm using a gitlab pipeline, where its base image repo is in AWS ECR. I've configured AWS ECR pull through cache where my upstream registry is docker hub.
In my runners, I've added this
[[...
1
vote
1
answer
22
views
Hugo site on GitLab Pages – sitemap.xml shows gitlab.io domain instead of custom domain
The site works fine on my custom domain (e.g. https://www.example.com/), but in the generated sitemap.xml (and also in RSS feeds) the URLs still point to the GitLab Pages default URL (https://project-...
1
vote
1
answer
34
views
Weird things when executing multiple ssh command in gitlab CI script
I have a gitlab CI pipeline defined in .gitlab-ci.yml. One job is to deploy and start a spring boot application to 2 different machines. I do it by invoking a bash script twice with different machine ...
1
vote
1
answer
73
views
GitLab cache not found in second job
According to the documentation, "Subsequent jobs in the same pipeline can use the cache, if the dependencies are identical." I have the following in my gitlab-ci.yml file:
slowcompile:
...
0
votes
1
answer
242
views
Unable to create masked variable because: The value must have 8 characters
I want to set up a Git_CI_USER. I get the message “Unable to create masked variable because: The value must have 8 characters.” My GIT_CI_USER only has 7 characters. Perhaps the problem can be solved ...
0
votes
0
answers
17
views
switch external .gitlab-ci.yml for a single branch
In project P we use an external "CI/CD configuration file" set to ".gitlab-ci.yml@library".
for a feature branch of P ("my_feature_p") I would like to test some changes ...
0
votes
0
answers
106
views
How to overwrite or delete an existing package version in GitLab Package Registry from CI/CD?
I have a GitLab CI/CD pipeline that builds and deploys a package into the GitLab Package Registry.
For a specific (and temporary) use case, I need the pipeline to delete the package from the registry ...
0
votes
0
answers
90
views
Why am I pointing to the wrong Repository?
Log:
client.go:14:2: reading gitlab.ts.gitlab.aws.de/ds/l2/clients/go.mod at revision clients/v1.0.1: git ls-remote -q origin in /go/pkg/mod/cache/vcs/...
1
vote
0
answers
65
views
How to let Gitlab/Langchain continue finding file?
I want to use Langchain to automatically update a helm chart via Gitlab-Python API. I realise it might work without langchain/llm with a more deterministic approach. However, i use it for testing ...
0
votes
0
answers
49
views
Disable re-run option for successful GitLab pipeline jobs
Problem to solve
How to prevent Developer/ Maintainer to manually re-run any GitLab jobs of the successful pipeline.
Steps to reproduce
Create a new pipeline which will executed on merge_request only....
0
votes
0
answers
144
views
.NET app starts but stops after few mins deployed in Azure
The .NET application is deployed as a docker container in azure app service. This is a staging environment app. After the app is deployed to azure it runs fine. I see following logs in azure ...
-1
votes
2
answers
138
views
Partially squash commits
I have a branch in GitLab with 18 commits, with a lot of back and forth trying the right way to escape something.
Ideally, the branch should have three commits, changing three different parts of the ...
0
votes
3
answers
120
views
In gitlab CI, how to branch and merge stages or jobs so that the pipeline can complete in different ways?
I have a CI script on my gitlab repositories to publish plugins for my application.
My plugins can either be published in debug or release. The steps for doing them are slightly different, so i have 3 ...
-2
votes
1
answer
61
views
How do I block jars but allow gradle-wapper.jar in GitLab?
Obviously I don't want binary files like jar or exe in my git repo so GitLab is configured to block commits that contain jars, exe files, msi files etc.
However, I do need gradle-wrapper.jar in there.
...
1
vote
0
answers
200
views
GitLab Inputs not being imported into pipelines when put in a template
I have a .gitlab-ci.yml template that looks something like so
# .base.yml
spec:
inputs:
RUNNER_TAG:
default: "one"
options: ["one", "two"]
type: ...
0
votes
1
answer
269
views
How to pass parallel matrix to a GitLab component?
We have an existing GitLab CI Template using parallel matrix to run a job in parallel with different variables.
include:
- project: 'ci-templates'
ref: main
file:
- Container/Container....
0
votes
0
answers
46
views
Would SQL Mesh integration with GitHub bot work in GitLab?
I'm looking at SQL Mesh bot in Github and seems to be following the Atlantis approach used in Terraform but brought into data modelling:
https://sqlmesh.readthedocs.io/en/stable/integrations/github/
...
0
votes
0
answers
82
views
Is it possible to run a GitLab pipeline every time a branch is deleted and only when a branch is deleted?
There are answers such as Run pipeline on gitlab when branch is deleted and even documentation on GitLab's site like https://docs.gitlab.com/ci/environments/#stopping-an-environment that make some ...
1
vote
0
answers
71
views
Run GitLab pipeline on protected branch only [closed]
I have code on GitLab and having CI/CD setup to run pipeline for different branches.
I have to run my main .gitlab.yml pipeline only on protected branches, not for non-protected branches.
Currently I ...
-3
votes
2
answers
100
views
Maven dependency from source [closed]
Is it's possible to use source repo as dependency instead of jar? I got few legacy projects in my selfhosted gitlab:
core(child)
api(parent)
web(parent)
The "core" project is dependency ...
0
votes
1
answer
106
views
Gitaly on gitlab not seeing my folder of repository
I wanted to upgrade my Gitlab to the latest one following the Gitlab process :
I have in my configuration
git_data_dirs({
"default" => {
"path" => "/data/gitlab/...
0
votes
0
answers
79
views
Gitlab runner cannot access git repository SSL: CERTIFICATE_VERIFY_FAILED
I tried using a Docker image called "CodiumAI PR-Agent," which can perform code reviews using AI.
To set this up, I installed GitLab Runner on a new server and created a .yml file according ...
5
votes
1
answer
245
views
Reducing duplication in GitLab CI with tags per multiple environments
I have a requirement to set tags for the selection of GitLab runners where tags differ per environment. Therefore, I need the tag to be set according to the value of $CI_COMMIT_BRANCH or $...
0
votes
1
answer
156
views
How to create new GitLab token with scopes
When I try to create new token with GitLab API like this:
curl --request POST --header "PRIVATE-TOKEN: glpat-" --data "name=test-token-short-ttl" --data "scopes[]=...
0
votes
0
answers
143
views
mlflow cannot fetch model registered on GitLab model registry
I’m trying to download artifacts and a model that has been saved using MLflow on GitLab model registry.
That's the working part of my code, where I set up the client, create model and version and ...
-1
votes
2
answers
460
views
What's the purpose of $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
I've seen this ...
0
votes
0
answers
31
views
Error: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running? [duplicate]
I'm working with gitlab and gitlab-runner on openshift and my ci-cd file looks like this:
image: docker:18-git
stages:
- ci
- build
- upload
variables:
DOCKER_HOST: tcp://docker:2375
...
2
votes
2
answers
146
views
semantic-release fails in GitLab CI: Commit rejected due to non-whitelisted author email
I'm using semantic-release in a GitLab CI pipeline. The release fails at the @semantic-release/git plugin step due to this error:
remote: ERROR: New commit has non-whitelisted author email: [semantic-...
1
vote
1
answer
238
views
Gitlab Web IDE Interactive Terminal not working
I've setup the Gitlab Runner with the following settings -
[session_server]
listen_address = "0.0.0.0:8093"
advertise_address = "winged-poring.projecthorizon.onl:8093"
...