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

Gitlab CI/CD: default value for environment variables

I would like to write a pipeline and include some default values that could be overridden by the user in the project CI/CD settings. Could I do something like the .gitlab-ci.yml bellow? It's not clear in the documentation... variables: VAR: $VAR…
Bruno Massa
  • 55
  • 1
  • 1
  • 10
3
votes
1 answer

Is there a way to add payment for a group in gitlab?

I have a group in gitlab for my dev team, all repositories are within a group but in order to run pipelines gitlab asks for payment method to any of my team members, is there a way I can add payment method for the whole group so my team mates are…
Alkaid
  • 81
  • 6
3
votes
1 answer

Gitlab CI does not support variable expansion in needs keyword, is there any solution?

I'm creating a template for all the deploy jobs, and I need to be able to use needs keyword with different values for each deploy job, but GitLab CI, as far as I know, does not support using variable in needs keyword. Is there any workaround? This…
Akram Rabie
  • 473
  • 5
  • 11
3
votes
2 answers

How to pass variables between jobs without artifacts in Gitlab-CI?

I want to pass some variables between jobs (on other stages) in my gitlab-ci scrypt. I used as in example: buildTest: stage: build artifacts: reports: dotenv: build.env name: "FullRelease" paths: …
Tadeusz
  • 6,453
  • 9
  • 40
  • 58
3
votes
1 answer

Is it possible to reserve a GitLab runner for all jobs/stages of a pipeline?

I'm using GitLab pipelines to run e2e tests on various physical machines (these machines are connected to the test hardware in a 1 to 1 relation). On each machine, a GitLab runner is installed. The pipeline consists of three major parts: prepare…
Tobi
  • 61
  • 6
3
votes
1 answer

Gitlab interservice communication

Hi does gitlab support interservice comminication. I found a question related to it Gitlab-CI: Cross-service communication in this there is a link to gitlab issue https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1042. Issue seems to be closed so…
Origin
  • 1,182
  • 1
  • 10
  • 25
3
votes
1 answer

Does GitLab provide a way to check the push options associated with a pipeline?

GitLab supports a variety of Push Options. Is there any way to check, in the web user interface or otherwise, what push options were used in a pipeline or job? In particular, what ci.variable push options are associated with the job or pipeline? One…
davidvandebunte
  • 1,286
  • 18
  • 25
3
votes
1 answer

Can't install bash in multiarch build on Alpine

I am trying to build image for linux/arm64/v8 on linux/amd64 Gitlab runner. I run it with this command: docker buildx create --use docker buildx build --platform linux/arm64/v8 -f Dockerfile.dev -t registry.gitlab.com/xxx:yyy --build-arg ENV=dev…
Holicz
  • 480
  • 5
  • 16
3
votes
1 answer

problem connecting to docker container from gitlab-runner container

I am trying to create a gitlab pipeline and run some containerized test in the runner; with DinD service, the container seems to be up and running, but I couldn't connect to it from the runner? is there any addtional settingg required?…
sqr
  • 365
  • 2
  • 12
  • 29
3
votes
1 answer

Find the value of a masked CI/CD variable

I am currently trying to find the value of a CI/CD variable in a VM. I tried to output it but I find out the variable’s value is masked in job logs. This is the code I used in my .gitlab-ci.yml. image: python:3 stages: - deploy deploy: stage:…
Nassim Gadhi
  • 153
  • 2
  • 8
3
votes
2 answers

gitlab CI/CD how to execute a multiline command as shown

I want to execute a command like below in the gitlabl CI/CD ssh $DEPLOY_USER@$DEPLOY_HOST <<'ENDSSH' set -x -o verbose; execute some command here set +x ENDSSH How to add such…
Santhosh
  • 9,965
  • 20
  • 103
  • 243
3
votes
1 answer

Gitlab: Make required variables when running pipeline

I want the some of the variables should be required before executing the pipeline in gitlab. Can I achieve it. I have below gitlab-ci.yml stages: # Runs First - Anything that needs to run prior to your scripts running - deploy -…
Rajarshi Das
  • 11,778
  • 6
  • 46
  • 74
3
votes
1 answer

Lint GitLab pipeline templates for syntax issues

I have a project filled with various pipeline templates that other projects can use for their work, keeping my CI DRY. These are not in a .gitlab-ci.yml file, but separate ./templates/language.yml files. I'm already using yaml lint to make sure it…
Josiah
  • 2,666
  • 5
  • 30
  • 40
3
votes
1 answer

Tests in Gitab CI pipeline marked as passed when 2 tests cases fail

We have a project managed in Gitlab, with CI pipeline for builds and tests (pytest, Google tests). Two or three of our test cases in Google tests fail. But Gitlab consider that the test stage is successful. Is it because the success percentage is…
pamplemousse_mk2
  • 178
  • 1
  • 11
3
votes
2 answers

Use Paketo.io / CloudNativeBuildpacks (CNB) in GitLab CI with Kubernetes executor & unprivileged Runners (without pack CLI & docker)

We want to use Paketo.io / CloudNativeBuildpacks (CNB) GitLab CI in the most simple way. Our GitLab setup uses an AWS EKS cluster with unprivileged GitLab CI Runners leveraging the Kubernetes executor. We also don't want to introduce security risks…
jonashackt
  • 12,022
  • 5
  • 67
  • 124