Questions tagged [gitlab-ci]

GitLab CI is a continuous integration server from GitLab.

GitLab CI integrates with your GitLab instance to build the projects and run tests on top. GitLab CI supports the Linux operating system.

GitLab CI pipelines are defined by a .gitlab-ci.yml file placed inside the project directory. For details on writing a .gitlab-ci.yml file visit https://docs.gitlab.com/ee/ci/yaml/.

More information is in https://about.gitlab.com/features/gitlab-ci-cd/.

8228 questions
39
votes
1 answer

With GitLab CI how to disable repository clone for one job?

I need to speed up the job 'deploy'. It does not need the sources of the project, only the artifacts. How to disable project cloning for the only job? Typical .gitlab-ci.yml (pseudo) looks like: image: gcc build: stage: build script: -…
kyb
  • 7,233
  • 5
  • 52
  • 105
39
votes
4 answers

Gitlab CI: npm doesn't like the cached node_modules

The internet is full of complains about Gitlab not caching, but in my case I think, that Gitlab CI indeed caches correctly. The thing is, that npm seems to install everything again anyway. cache: key: ${CI_COMMIT_REF_SLUG} paths: -…
TimSch
  • 1,189
  • 1
  • 12
  • 27
39
votes
3 answers

How do I establish manual stages in Gitlab CI?

I'd can't seem to find any documentation of manual staging in Gitlab CI in version 8.9. How do I do a manual stage such as "Deploy to Test"? I'd like Gitlab CI to deploy a successful RPM to dev, and then once I've reviewed it, push to Test, and…
Routhinator
  • 3,559
  • 4
  • 24
  • 35
38
votes
3 answers

exec: "pwsh": executable file not found in %PATH%

I've been trying to initiate my pipeline on gitlab CI/CD for a demo project. I've installed gitlab-runner in my windows local machine and gave the executor type as "Shell". And I've successfully integrated the gitlab-runner with my gitlab project.…
Aravind S
  • 381
  • 1
  • 3
  • 5
38
votes
2 answers

How to NOT download artifacts from previous stages for build configuration?

I have a gitlab CI build process with 4 steps, in which artifacts produced in first step are packaged into docker image in 2nd step, then the output image is given as the artifact to 3rd step, and there is a 4th step afterwards, that notifies…
9ilsdx 9rvj 0lo
  • 7,955
  • 10
  • 38
  • 77
38
votes
7 answers

How to avoid reinstalling dependencies for each job in Gitlab CI

I'm using Gitlab CI 8.0 with gitlab-ci-multi-runner 0.6.0. I have a .gitlab-ci.yml file similar to the following: before_script: - npm install server_tests: script: mocha client_tests: script: karma start karma.conf.js This works but it…
Tamlyn
  • 22,122
  • 12
  • 111
  • 127
37
votes
9 answers

How do I delete/unregister a GitLab runner

I have registered a personal GitLab runner several months ago, which I no longer use. How do I completely delete it so that it does not show up on my GitLab CI/CD settings page?
ostrokach
  • 17,993
  • 11
  • 78
  • 90
37
votes
4 answers

Gitlab CI - docker: command not found

I am trying to build my docker image within the gitlab ci pipeline. However it is not able to find the docker command. /bin/bash: line 69: docker: command not found ERROR: Job failed: error executing remote command: command terminated with…
Kay
  • 17,906
  • 63
  • 162
  • 270
37
votes
7 answers

Share gitlab-ci.yml between projects

We are thinking to move our ci from jenkins to gitlab. We have several projects that have the same build workflow. Right now we use a shared library where the pipelines are defined and the jenkinsfile inside the project only calls a method defined…
37
votes
12 answers

gitlab: Runner is offline, last contact was about some hours ago

recently my runners have been stopped and I don't know why? I've just upgraded nodejs on the server and it did happen. after this problem, I've tried to update gitlab to the latest version and check the runner status but the problem still persists…
Majid Parvin
  • 4,499
  • 5
  • 29
  • 47
36
votes
3 answers

Set gitlab-ci.yml variable via bash command

variables: CUSTOM_NODE_VERSION: '$${cat .nvmrc}' I'd like for the variable CUSTOM_NODE_VERSION to be populated via the contents of the .nvmrc file (which is located in the projects root directory). How does one do this in the gitlab-ci.yml…
basickarl
  • 37,187
  • 64
  • 214
  • 335
35
votes
4 answers

Gitlab CI/CD: New runner has not been connected yet

I am very new to Gitlab CI/CD and I have read its documentation very carefully about creating a new CI/CD process using .gitlab-ci.yml file. As I have found out in order to have Continuous Deployment (also known as CD), it is needed to register a…
35
votes
8 answers

gitlab runner doesn`t work on a specific project

I registered 11 projects of GitLab runner. Runners of each project work fine except 1 project. First time I registered runner of this project, it works. But after I commit/push some changes, an error occurs and failed job. I saw some solutions that…
Sungmin Park
  • 459
  • 1
  • 4
  • 7
35
votes
4 answers

Can't share global variable value between jobs in gitlab ci yaml file

I'm trying to build an application using GitLab CI. The name of the generated file is depending on the time, in this format DEV_APP_yyyyMMddhhmm (example: DEV_APP_201810221340, corresponding to the date of today 2018/10/22 13h40). How can I store…
mourad
  • 369
  • 1
  • 3
  • 9
35
votes
1 answer

Configure runner to run multiple jobs at the same time

When having one gitlab runner serving multiple projects, it can only run one CI pipeline while the other project pipelines have to queue. Is it possible to make a gitlab runner run pipelines from all projects in parallel? I don't seem to find…
Roderick Jonsson
  • 1,111
  • 1
  • 10
  • 16