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
34
votes
1 answer

How to perform kaniko Docker build and push in separate GitLab CI stages?

I have a Dockerfile which I can build using kaniko in the GitLab CI/CD pipeline. Currently the build stage both builds the Container and pushes it to the remote Docker repository. I would like to utilize the stages concept of the CI/CD pipeline to…
kmindi
  • 4,524
  • 4
  • 31
  • 47
34
votes
6 answers

Gitlab CI how to deploy an application via SSH

I'm using Hosted Gitlab to host my Git repositories, and more recently I've been using it to build/deploy PHP and Java applications to servers. What I'd like to do is once a build is complete, deploy the application using SSH. Sometimes this might…
SheppardDigital
  • 3,165
  • 8
  • 44
  • 74
33
votes
7 answers

Why am I getting "Pipeline failed due to the user not being verified" & "Detached merge request pipeline" on a Gitlab merge request?

When a non-owner dev pushes a branch to our Gitlab repo, it returns a "pipeline failed" message, with the detail "Pipeline failed due to the user not being verified". On the dev's account, he's getting a prompt to add a credit card to verify him to…
33
votes
7 answers

Tests using embedded postgres fail with Illegal State Exception

I'm running some tests against an embedded postgres database using otj-pg-embedded. While the tests run fine locally they fail when run by Gitlab-CI with an Illegal State Exception. Gitlab CI builds it and runs tests that don't include…
kormak
  • 331
  • 1
  • 3
  • 4
33
votes
3 answers

Clearing the pipeline cache with Gitlab CI

Is is possible to invalidate or clear a pipeline cache with Gitlab CI after a pipeline completes? My .gitlab-ci.yml file has the following global cache definition cache: key: "%CI_PIPELINE_ID%" paths: - './msvc/Project1`/bin/Debug' -…
Dan
  • 1,805
  • 2
  • 18
  • 21
33
votes
7 answers

Remove artifacts from CI manually

I have a private repository at gitlab.com that uses the CI feature. Some of the CI jobs create artifacts files that are stored. I just implemented that the artifacts are deleted automatically after one day by adding this to the CI…
user1251007
  • 15,891
  • 14
  • 50
  • 76
32
votes
7 answers

gitlab runner The requested URL returned error: 403

I'm currently using gitlab.com (not local installation) with their multi-runner for CI integration. This works great on one of my projects but fails for another. I'm using 2012R2 for my host with MSBuild version 14.0.23107.0. I know the error…
Todd S
  • 891
  • 1
  • 7
  • 8
31
votes
4 answers

Gitlab: How to use artifacts in subsequent jobs after build

I've been trying to make a GitLab CI/CD pipeline for deploying my MEAN application. I have three stages: 1. test 2. build 3. deploy The build stage has a build_angular job which generates an artifact. Now I want to use this artifacts in the next…
Goutam B Seervi
  • 1,096
  • 1
  • 18
  • 31
31
votes
5 answers

Push files to gitlab-ci via CI runner

I am using gitlab CI runner to test my code and generating some files. I just want to push the generated files to gitlab repository via CI runner. Is there any way to do that ?
Venkat
  • 603
  • 1
  • 8
  • 17
31
votes
3 answers

What is the special gitlab-ci-token user?

The docs for gitlab's container registry (https://gitlab.com/help/container_registry/README.md) provide a config example with this instruction: - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com and this explanation: You have…
user1447137
  • 401
  • 1
  • 6
  • 6
31
votes
6 answers

Using gitlab's nginx to serve another app

Hello I have installed Gitlab using this https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#installation Now I want to use nginx to serve another content other than gitlab application how can I do this Where are the config files…
yokodev
  • 1,266
  • 2
  • 14
  • 28
30
votes
5 answers

Adds needs relations to GitLab CI yaml but got an error: the job was not added to the pipeline

I am trying to add needs between jobs in the Gitlab CI yaml configuration file. stages: - build - test - package - deploy maven-build: stage: build only: - merge_requests - master - branches ... test: stage: test …
Hantsy
  • 8,006
  • 7
  • 64
  • 109
30
votes
3 answers

Conditional variables in gitlab-ci.yml

Depending on branch the build comes from I need to use slightly different command line arguments. Particularly I would like to upload snapshot nexus artifacts when building from a branch, and release artifact when building off master. Is there a way…
30
votes
3 answers

gitlab ci cache no matching files

I try to build apk with gitlab runner When I build apk, I don't want download all build pacakage everytime so i try to caching .gradle/caches and .gradle/wrappers following is my gitlab-ci.yml sdk_build_job image: myimage:latest stage:…
fuzes
  • 1,777
  • 4
  • 20
  • 40
30
votes
3 answers

GitLab CI Start job manually (deployment)

Is it possible to mark gitlab ci jobs to start manually? I need it for deploying application but I want to decide if it's going to be deployed