Skip to main content

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
0 answers
15 views

Gitlab out of memory kills network on VPS

On a VPS (that is not heavily used) with 4 shared vCPU's and 8GB RAM I'm running the following services: Traefik for reverse proxy Portainer for docker management Gitlab, used by 5 people Grafana ...
Postie's user avatar
  • 113
1 vote
1 answer
22 views

Different Gitlab Runners depending on the Tag/Branch

My Gitlab project is using the Gitlab pipelines, and I would want to use a different Gitlab Runner depending on whether the trigger is a simple push, or e.g. a tag marking a release. The idea is that ...
Markus Erlacher's user avatar
0 votes
1 answer
28 views

How do you preserve conditionally created artifacts (artifacts created with changes)?

Gitlab allows you to run jobs conditionally based on the files being modified using the rules:changes functionality. It looks like this, build: stage: build script: - mkdir dist - echo &...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
53 views

How can I download the latest artifact by name, regardless of pipeline status?

I have a job which is maintained by a team, let's call it docs. It runs in a pipeline with jobs maintained by other teams. If the docs team job succeeds, I want to download artifact regardless of the ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
179 views

Stage and jobs blocks breaks gitlab CI with "configuration is invalid: jobs jobs config should implement a script: or a trigger: keyword"

.gitlab-ci.yml with stages: - test jobs: lint: stage: test image: python:3.8 # Assuming same image for both jobs script: - pip install black - black --check . ...
MosQuan's user avatar
0 votes
2 answers
78 views

Restrict access to trigger the GitLab pipeline job

I have a requirement: Only people with the Maintainer access in the repository should have access to trigger the Gitlab pipeline jobs in the respective repository. The developers in the repositories ...
Ajay's user avatar
  • 210
0 votes
0 answers
38 views

Is it possible to update a Merge Request that runs in the parent project with GitLab?

I have a repository called foo and I've forked it into bar. I want to write a pipeline that modifies Merge Requests adding a chore commit such that when bar sends a Merge Request to foo it will run ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
40 views

How can I use `glab api` commands to configure settings that don't have a developed UI?

According to the documentation on Merge Request Pipelines, To prevent users from running new pipelines for fork projects in the parent project use the projects API to disable the ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
487 views

How does $CI_PIPELINE_SOURCE == 'merge_request_event' work?

I have in my gitlab.yml file, rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' Before adding that my pipeline was working fine. I just wanted to make it such that the job above was only ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
144 views

When using a Project Access Token, I'm getting "The requested URL returned error: 403"

When I try to use a project access token, I'm getting $ git clone https://asdf:[email protected]/evancarroll/foo.git Cloning into 'foo'... remote: You are not allowed to download code from this project. ...
Evan Carroll's user avatar
  • 2,211
1 vote
2 answers
163 views

How can I push to a repo when CI_JOB_TOKEN doesn't permit it?

Currently, CI_JOB_TOKEN doesn't allow you to push to a repo. When I try I get, remote: You are not allowed to upload code. How can I work around this if I need to push to the repo in the CI? The ...
Evan Carroll's user avatar
  • 2,211
0 votes
2 answers
374 views

What is a "chore commit"?

I've seen the term "chore commit" used in multiple places, what is a chore commit? And it's in the commit message here. chore(gitattributes): ensured consistent line endings across OSs ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
11 views

What can a token with a role of Guest or Reporter do when given scopes to read and write the repository?

If I create a Project Access Token, or Personal Access Token (PAT) token with a role of Guest, and a scope such that it can read_repository and write_repository, what can that token actually do? I'm ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
49 views

Does glab (glab-cli) support creating project access tokens?

I would like to make a chore commit in my CI. Currently, CI_JOB_TOKEN doesn't allow pushing to the repo. The workaround is to create a project access token with write perms. Is it possible to do this ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
40 views

How can I set an environmental variable with glab (glab-cli)?

I would like to set an environmental variable with glab. I don't see the option on glab ci. How can I set an environmental variable?
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
32 views

How do I stop all users from creating branches on GitLab and force Merge Requests?

My company wants to create a policy where only one person can create a new branch, and not every developer on a project. The only method of contribution that they want is merge-requests. How can we ...
Evan Carroll's user avatar
  • 2,211
0 votes
2 answers
120 views

How do you get to to the admin area of GitLab?

Ever since Gitlab changed their UI, I can never find out how to get to the admin area? How do you do it?
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
51 views

How can I delete Terraform assets and statefiles created in a pipeline using the remote GitLab backend?

Currently I have a detached pipeline which uses the Terraform with the remote Gitlab backend. How can I after the pipeline has run delete BOTH the assets created and the statefile?
Evan Carroll's user avatar
  • 2,211
0 votes
0 answers
106 views

MicroK8s does not authenticate with gitlab private registry

I have an instance of MicroK8s, I am currently migrating my applications. But I can't authenticate to Gitlab's private registry. About my environment: MicroK8s Gitlab (with registry working securely) ...
Hiago Souza's user avatar
0 votes
0 answers
70 views

Gitlab ci variables disappearing in pipeline run

We have a large, fairly complex set of yaml files that defines pipeline configurations for multiple apps using gitlab ci. A single pipeline consists of a dozen or more separate yaml configs that use ...
Sabien's user avatar
  • 1
0 votes
1 answer
574 views

What is the URL I provide to docker or podman to pull down a GitLab registry image?

When I am at a repo's container registry, I can see this, However it's not clear ohw that URL works, the URL provided is gitlab-org/gitlab-runner/alpine-no-root But I can't run podman pull gitlab-...
Evan Carroll's user avatar
  • 2,211
1 vote
2 answers
2k 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
  • 11
0 votes
0 answers
81 views

Do Gitlab Personal Access Tokens grant permissions on repos you own, or all repos you have access to?

In Gitlab I can create a Personal Access Token for read_repository and write_repository permissions. Does this token grant access to just my projects in my namespace, or all projects that I have ...
Evan Carroll's user avatar
  • 2,211
1 vote
1 answer
153 views

Why i cant include a .yml in CI/CD, using rules with mine variables?

Why my pipeline doesn't work? I just want include this .yml if "NATIVE_COMPILE" is "true". variables: NATIVE_COMPILE : "true" include: - project: 'pipelines/cicd' ...
Alan Michel's user avatar
0 votes
1 answer
2k 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
1 vote
1 answer
1k 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
3 answers
223 views

Estimate storage space for a git server

How to estimate the space a git repository will take on a source version control server? For example, given k commits every day, with x kB of code per commit, my repository will take n GB of server ...
user2315856's user avatar
0 votes
0 answers
915 views

Need to run a GitLab pipeline job if a prior job succeeds

I have a project in GitLab that has jobs in the pipeline to build the image, run unit tests and push the built image to a repository. I would like to set it up with the following conditions: The push ...
Joseph Gagnon's user avatar
1 vote
1 answer
1k 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
  • 121
0 votes
0 answers
760 views

Unsecure container registry declaration in Gitlab CI/CD

I have the following .gitlab-ci.yml file : stages: - publish - deploy variables: TAG_LATEST: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:latest TAG_COMMIT: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:$...
baks's user avatar
  • 1
1 vote
1 answer
244 views

What is the point of starting pipeline when MR creating?

Can you explain what the point of starting pipeline for source branch again when I do MR in default branch? I mean, when I did git push before in my feature branch which I want to merge with master, ...
VladF's user avatar
  • 35
0 votes
2 answers
875 views

GitLab file variable with a dot or period `.` in its name?

I have a file called .auto.tfvars that I want to use to set some Terraform variables in an CI run, however when I try to add it, I get a popup called, Variables key can contain only letters, digits ...
Evan Carroll's user avatar
  • 2,211
1 vote
1 answer
284 views

Can you use the Secure File API if the container doesn't have bash? Like Alpine?

GitLab offers a Project-level Secure Files, the API has you add this to your .gitlab-ci.yml, test: variables: SECURE_FILES_DOWNLOAD_PATH: './where/files/should/go/' script: - curl --silent ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
116 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
0 votes
1 answer
211 views

How does GitLab handle stranded (orphaned) artifacts in Object Store?

If I have a two minio clusters, one running in production and, one running as a hot-backup streaming with mc mirror, And, if I have a point-in-time-backup running gitaly-backup. What happens if new ...
Evan Carroll's user avatar
  • 2,211
3 votes
0 answers
217 views

What is the Manifest Digest in GitLab and how do I find out more information about the manifest?

GitLab provides for a "Manifest Digest", What exactly is the Manifest Digest, a digest of, and how do I get access to this manifest to see how it's different from other images.. this ...
Evan Carroll's user avatar
  • 2,211
3 votes
2 answers
1k views

What is the GitLab "Digest" on the container registry next to the images, why is different for two duplicated images

The GitLab container registry has a bunch of Digests, you can see them here, Normally, I would expect them to represent the image's own digest, however, they don't, when I look at them here locally ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
257 views

In Gitlab is there a way to automatically change a tag on a ticket when an MR is created and/or when a deployment is completed

In Gitlab we have a flow where our tickets go from "In Progress" to "Code Review" when an MR is created and from "Code Review" to "Ready for Testing" when a ...
Agreene's user avatar
  • 51
2 votes
1 answer
5k views

Run GitLab job only if variable is provided

I have two jobs in my gitlab ci pipeline 'job a' and 'job b'. I want only 'job a' to run if variable x is provided and run 'job b' if variable b isn't provided. Something like this. job a: rule: ...
Alan's user avatar
  • 23
3 votes
1 answer
4k views

How to change value of pre-defined variable in GitLab to all lowercase

My environment requires the use of the predefined variable CI_PROJECT_NAMESPACE in .gitlab-ci.yml; however, this variable is in all caps, which makes my build job fail. I've tried several ways to ...
wwillfred's user avatar
2 votes
1 answer
10k 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
  • 2,211
0 votes
1 answer
1k 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
  • 2,211
-1 votes
1 answer
48 views

What is `file_store` in the `ci_job_artifacts`?

Where is this field defined and what does it mean? I can't find any information about it.
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
77 views

How can I create a path into GitLab Object Storage from the ci_job_artifacts table?

Gitlab has an internal PostgreSQL database. There is a client wrapper for psql called gitlab-psql that I connect to it with. This allows me to query job artifacts through the table ci_job_artifacts. ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
24 views

What is the GitLab proj_id_hash for the bucket structure in the object store?

In this document covering the Feature Bucket, it says, the Bucket Structure for the Job Artifacts is /artifacts/<proj_id_hash>/<date>/<job_id>/<artifact_id> In the above, what ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
152 views

What is a GitLab locked artifact?

In the table ci_job_artifacts there is a column called locked. What does this column do? It's not documented in the Job Artifacts API? It's currently a smallint and it has 3 possible values: 0, 1, 2. ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
237 views

Does GitLab support searching logs across jobs for specific strings?

I need to find all jobs that failed in a specific fashion, a few methods are viable One method that would be viable is finding where GitLab stores its log files, and searching them with something ...
Evan Carroll's user avatar
  • 2,211
0 votes
1 answer
92 views

Where does GitLab omnibus store ci log files?

When viewing a raw CI log file, such as this one https://acmeco.net/acmeco/acmeco/angular-ui/-/jobs/334040/raw I can see content such as net/http: request canceled (Client.Timeout exceeded while ...
Evan Carroll's user avatar
  • 2,211
0 votes
2 answers
829 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: ...
Rabah DevOps's user avatar
0 votes
2 answers
986 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

1
2 3 4 5