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 pipeline - instead of 1, 2 are running

I would like to add to Gitlab pipeline a stage which verifies that the person approving the MR is different from the person doing the creation/merge (for this to work, I checked the setting in Gitlab that says: "Pipelines must succeed"). stages: …
Bemojo
  • 96
  • 9
3
votes
2 answers

How could I run a remote command within a Gitlab CI Pipeline using sshpass and print the output/depend on the result of that command?

I want to run a script that is on a separate server within a Gitlab CI job and have the job print the output of that script and depend on the script's result. I'm using sshpass to get around inputting a password like this: - sshpass -p "password"…
thebaconator
  • 223
  • 6
  • 10
3
votes
2 answers

how can i get the gitlab CI Jobs error log?

[**` [when i try to build a pipeline job from the gitlab ci, i got some error , but i can't get the error logs so i can't resolve the problem, heres my sample pipeline script stages: build test variables: LANG: "en_US.UTF-8" before_script: yarn…
3
votes
2 answers

Unable to set Variable in gitlab-ci.yml

In this abridged version of a gitlab-ci.yaml file. The global variable APP_VERSION can either be filled or left blank. In the case of it being left blank, I want to set the variable to the version value that exists in version_cache/version.txt. If…
paiego
  • 3,619
  • 34
  • 43
3
votes
1 answer

How to use REST API to create a file in GitLab and if a file with the same name existed, overwrite the old file

How to use REST API to create a file in GitLab and if a file with the same name existed, overwrite the old file. Does the "create" action automatically does this for me? https://docs.gitlab.com/ee/api/commits.html E.g. I wanna upload XXX/YYY/A.txt,…
user3489985
  • 327
  • 4
  • 18
3
votes
1 answer

How can I set a minimum unit test coverage with GitLab CI?

I have a project hosted on GitLab that already has working CI configuration. I would like to add the notion of "minimal code coverage". What I would love is to force a positive delta (the code coverage of the Merge Request must be greater than the…
SteeveDroz
  • 6,006
  • 6
  • 33
  • 65
3
votes
3 answers

Artifacts are not pulled in a child pipeline

This is my gitlab ci config. In the build stage the application is build in the distfolder, which is stored as an artifact. The next deploy stage is a trigger to run a child pipeline for the deployment. But the dist artifacts aren't pulled for the…
user3142695
  • 15,844
  • 47
  • 176
  • 332
3
votes
1 answer

Ignore Flake8 "Line too long" error in gitlab CI

I'm using flake8 in my gitlab CI stage. my .gitlab-ci.yaml linting stage looks like this : linting: stage: linting tags: - docker before_script: - pip3 install flake8 script: - flake8 . only: - merge_requests Is there a…
Snowfire
  • 171
  • 9
3
votes
1 answer

How to clone a private git repository using Gitlab CI

Scenario: I've created two repositories inside my GitLab account: 'work' & 'project'. There are multiple branches in each of the following repos. I'm currently in the project repo and have created the .gitlab-ci.yml file. Task: I want to copy two…
3
votes
1 answer

how to use an "or" statement to make a dependent job in Gitlab CI?

I have a pipeline I'm putting together that has three different "deploy" steps, each with its own unique deployment but can be triggered by the same job. Ideally, I would like to find a way to "or" the items inside of the needs section to make the…
Patrick Zawadzki
  • 456
  • 2
  • 6
  • 26
3
votes
2 answers

How reference variables in job rules in gitlab ci?

I need to reuse variables in a gitlab ci job rules include: - template: "Workflows/Branch-Pipelines.gitlab-ci.yml" .staging_variables: variables: CONFIG_NAME: "staging" .staging_rules: rules: - if: $CI_COMMIT_BRANCH ==…
Amin Ba
  • 1,603
  • 1
  • 13
  • 38
3
votes
1 answer

Using pywin32 in a GitLab CI YML file - getting error on pip install

Trying to run a Python program using GitLab's CI pipeline. I had this running in Teamcity, but I wanted to try in GitLab. First attempt I supplied an explicit list of pip install commands including wmi. # This file is a template, and might need…
Guy
  • 666
  • 1
  • 10
  • 34
3
votes
1 answer

gitlab-ci rules for manual job only on merge requests

I am finding it difficult to restrict a stage to only run on MR and be manual I have the following rules rules: - when: manual - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_COMMIT_BRANCH' when:…
uberrebu
  • 3,597
  • 9
  • 38
  • 73
3
votes
2 answers

How to deploy Blazor WebAssembly as static site in GitLab Pages

I can't find any guide on how to deploy a Blazor web assembly app to GitLab Pages as a static site. Has anyone managed to do so for .NET 6? I have created a sample web assembly Blazor client…
diegosasw
  • 13,734
  • 16
  • 95
  • 159
3
votes
1 answer

How can I pass value of variable from one job to next job in pipeline in GitLab CI?

Am I able to pass value from variable that I created in one job to next job so I can do some checks of that value in next job of the same stage ? I would like to have first job that creates some variable and then assigns value to that variable and…