Skip to main content
14 votes
Accepted

Is it possible to have multiple gitlab-ci files in a single repo?

No, you can't have multiple gitlab-ci files per repository. You can see more information in the following links: https://gitlab.com/gitlab-org/gitlab-foss/issues/18157 https://gitlab.com/gitlab-org/...
Aykut Açikel's user avatar
14 votes
Accepted

Can I run multiple pipelines in a single GitLab repo using GitLab CI/CD?

Yes, you can use the rules syntax. You can use this in combination with regex for commit message, ci_pipeline_source or any other available CI variables. job1: script: - do something on ...
zm31's user avatar
  • 381
13 votes
Accepted

How to tag source code using gitlabCI

I tried to change docker image and added couple steps for git tag. Below is the answer worked for me, image: maven stages: - build - deploy - tag maven_build: stage: build script: - mvn clean ...
pandey's user avatar
  • 949
11 votes

Installing azcopy in Gitlab Runner (Alpine Linux)

This is a glibc dependency issue on Alpine. This azcopy binary is compatible with Linux distributions that use glibc, GNU's C standard library. Alpine Linux uses a different libc implementation, musl-...
valiano's user avatar
  • 235
9 votes
Accepted

Gitlab CI error during connect: Get http://docker:2375/v1.40/containers/json?all=1: dial tcp: lookup docker on xx.xx.xx.x:xx: no such host

I might have skipped the optional installation of docker in my Ubuntu instance, so if the gitlab runner is going to use Docker, remember to install it: curl -sSL https://get.docker.com/ | sh I got ...
punkbit's user avatar
  • 349
7 votes

Is it possible to have multiple gitlab-ci files in a single repo?

You are not able to create multiple .gitlab-ci.yml but you can manage to have what you want. You currently have multiple software in the same repository with the same CI/CD Pipeline or jobs for your ...
Alexandre Burgoni's user avatar
5 votes
Accepted

GitLab CI/CD job without pulling LFS files?

Yes, full cloning of LFS files can be restricted! By default, GitLab will clone your repo into the CI/CD build directory. To limit the clone from downloading the LFS files, tell it not to do it. ...
rickhg12hs's user avatar
5 votes

Set job start timeout in Gitlab CI

There are three types of timeouts in Gitlab CI: Project timeout Runner timeout Jobs timeout Project timeout According to GitLab docs: Timeout defines the maximum amount of time in minutes that a ...
Yasen's user avatar
  • 692
4 votes
Accepted

How to pass Gitlab env var with sensitive characters to bash script?

Surprisingly indeed GitLab works weirdly with the env vars. It evaluates them internally, though it shouldn't in my view. Value set as (in project Settings > CI/CD > Variables): 'aaa$bbb*%' becomes '...
Ivan's user avatar
  • 156
4 votes

Build Docker images with DinD and BuildKit

Caching of layers with buildkit in an external registry requires an extra step or two depending on how you want to cache your layers. The easy option is to include a build arg that enables the inline ...
BMitch's user avatar
  • 3,380
3 votes
Accepted

Best way to create a Ci/CD pipeline to reduce bugs and facilitate refactor

It might not be obvious now, but usually as projects advance full regression costs (resources/time) grow much faster than static analysis ones. You'll also find that static analysis alone isn't a ...
Dan Cornilescu's user avatar
3 votes
Accepted

Git-based CI/CD Pipeline for Monorepo

The fact that all the code is in a single repository doesn't mean that all the code is changing every time a commit is pushed. I would first make the "pathways" in the code explicit. E.g. perhaps you ...
Bruce Becker's user avatar
  • 3,693
3 votes

How to tag source code using gitlabCI

Combining the answer of https://devops.stackexchange.com/a/3854/10932 and the comment of Overbryd along with a slight modification worked for me. Here, instead of using using git remote set-url ...
Neron Joseph's user avatar
3 votes

One time/set up jobs on gitlab ci?

I dealt with the same issue. Some people recommended using the Gitlab group "secrets" and using before_script. Since I knew I was also going to deploy and would need other tools on my runner like "...
Levi's user avatar
  • 1,054
3 votes
Accepted

Gitlab CI Runner command line doesn't care about --parameters

You're missing the --non-interactive tag to your registration command. Full command should be: gitlab-runner register --non-interactive --locked false --run-untagged true --tag-list java --name foo -...
Rekovni's user avatar
  • 933
3 votes
Accepted

Error from server (Forbidden): error when retrieving current configuration of: Resource: "apps/v1, Resource=deployments",

Going from this, your ClusterRole isn't configured to allow access to deployments, and the ClusterRole you've listed isn't properly bound to your service account. You could configure it with something ...
Kanga_Roo's user avatar
  • 146
3 votes
Accepted

Problem on gitlab-runner: cannot lock ref [...] Another git process seems to be running in this repository

The easiest solution for me was to execute docker container prune on the runner machine. The command removes all stopped docker containers and the .lock files therein. Running a pipeline from ...
M. Heuer's user avatar
  • 161
3 votes

GitLab CI/CD page listing many gitlab runners that no longer exist

Just unregister offline runners: As per GitLab Runner commands manual: To delete the old and removed from GitLab runners, execute the following command. gitlab-runner verify --delete You are ...
Yasen's user avatar
  • 692
3 votes

Gitlab CI push to docker-registry fails

Are you sure that your registry is publicly available? Checklist: Check if the domain is reachable and responding the right IP address -- nslookup myregistry Check if your port is open or not blocked ...
Hakob's user avatar
  • 359
3 votes
Accepted

This job is stuck because you don't have any active runners online

Runners are machines (typically containers) where your jobs run. Gitlab offers shared runners, and you can also bring in your own runners (machines that you register against Gitlab to run your jobs). ...
migueldavid's user avatar
3 votes

This job is stuck because you don't have any active runners online

After Further research, I found an open issue on gitlab pretty similar to mine. They describe runners freshly created and unable to pick up jobs. As for my use case, The runner was created but with ...
phgolard's user avatar
3 votes
Accepted

How to get GitLab CI to rebuild on JIRA issue status change?

I didn't get what's wrong with webhooks You just create a webhook on Gitlab CI side and provide this URL to your Jira account. https://gitlab.com/api/v4/projects/PROJECT_ID/ref/REF_NAME/trigger/...
Most Wanted's user avatar
3 votes

Gitlab runner fails with connection timeout

This is likely because your requests were dropped before they landed on the GitLab host. Check your firewalls and other security rules after assured that the 1234 port is open
Hakob's user avatar
  • 359
3 votes
Accepted

GitLab CI runner: remote: You are not allowed to download code from this project

This problem is caused when the person (admin) that tried to execute the pipeline replay had insufficient access to the repository they replayed it on. This can happen when the for example the ...
Evan Carroll's user avatar
  • 2,391
2 votes

How to tag source code using gitlabCI

git push origin 1.0.15 should work and a new tag should be added to the tags in gitlab https://docs.gitlab.com/ee/university/training/topics/tags.html git checkout master # Lightweight tag git tag ...
030's user avatar
  • 13.3k
2 votes

Have Jenkins trigger GitlabCI

Note: I didn't use this yet, the answer is based solely on documentation. A GitlabCI pipeline can be triggered via API, see Triggering pipelines through the API. Triggers can be used to force a ...
Dan Cornilescu's user avatar
2 votes
Accepted

GitLab - trigger pipeline to build on specific runner

There currently isn't a solution for building on a specific runner in GitLab, but there is an issue open for Sticky Runners, which hopefully will be out in the next 3-6 months according to the ...
Rekovni's user avatar
  • 933
2 votes

Where to obtain the token to register a GitLab runner?

For a specific GitLab runner tied to a project, the token can be found in Step 3; in Project -> Settings -> CI/CD -> Runners in the Setup a specific Runner manually section. You will also be ...
Rekovni's user avatar
  • 933
2 votes
Accepted

Adding a persistent volume to a Kubernetes deployment from Gitlab Auto Dev-ops

The answer is that all Auto Dev-Ops deployments at present use Helm to package and deploy your application. In order to make changes to the deployment, such as adding a persistent volume claim, you ...
Chris Watts's user avatar
2 votes
Accepted

No space left on device when running job on photon-os

Well this seems to be a docker issue. It’s keeping a whole lot of dangling volumes. check if you have some : docker volume ls -qf dangling=true Get rid of them with : docker volume rm $(docker ...
Armel Larcier's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible