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
0 answers

Horusec v2.8 is not working in CI Docker in Docker environment

The issue The Horusec Docker image starting from version 2.8 is not working properly inside a DinD CI/CD like GitLab CI. Debugging Using this line: docker version -f '{{json .}}' | jq I have this output inside the CI: { "Client": { …
rios0rios0
  • 735
  • 7
  • 20
3
votes
3 answers

Gitlab-ci stage order ignored when rules includes changes

consider the following gitlab-ci.yaml, for a mono repo with multiple microfrontends stages: - build - deploy build:app1: stage: build script: - sleep 30 - mkdir dist1 - touch dist1/output1.html rules: - if:…
Joran Beasley
  • 110,522
  • 12
  • 160
  • 179
3
votes
2 answers

GitLab CI Pipeline: Pipeline cannot be run

I can't find out why the GitLab CI Pipelines for my Repo won't run. I have a .gitlab-ci.yml file and the feature enabled, but the pipeline won't run. Also if I try to trigger the pipeline manually I get the following error back. Pipeline cannot be…
Thomas Venturini
  • 3,500
  • 4
  • 34
  • 43
3
votes
0 answers

Access image in GCP Artifact Registry from Gitlab CI/CD using a service-account key

I am trying to run a Gitlab CI job using an image from a private GCP Artifact Registry, i.e.: build job: stage: build_job image: toto-tata-docker.pkg.dev/my-gcp/my-project/my-image:${IMAGE_VERSION} variables: ... I have read in many…
tbridel
  • 31
  • 2
3
votes
2 answers

Gitlab CICD cannot add service

For my projects I sometimes need to unittest my code against a ms sql server. At the moment, I created a monstrous docker image, containing all the tools I need, including the sql server. Now this image got to about 15 GB in size, which is really…
Foitn
  • 604
  • 6
  • 25
3
votes
1 answer

Gitlab CI hanging

We have a set of CI pipelines running in Gitlab v15.3. We have an intermittent issue, where some build targets hang. If we cancel and retry they run to completion. There seems to be no distinct pattern; any targets might be affected, a set of…
djna
  • 54,992
  • 14
  • 74
  • 117
3
votes
2 answers

Gitlab CI pipeline is not working correctly

I have a Gitlab CI pipeline with Powershell script. The pipeline is executed scuccessfully but didn't get any result. The purpose of Pipeline is to create a checkpoint on PTC Windchill server. The pipeline doesn't create a checkpoint. However when I…
Khani
  • 31
  • 2
3
votes
3 answers

gitlab-runner passes wrong arguments to custom image

I have written a small CLI using Java, Argparse4j, and packaged it in docker using this Dockerfile: FROM openjdk:18 ENV JAR_NAME "my-jar-with-dependencies.jar" ENV PROJECT_HOME /opt/app RUN mkdir -p $PROJECT_HOME WORKDIR $PROJECT_HOME COPY run.sh…
ruben1691
  • 353
  • 3
  • 20
3
votes
0 answers

GitLab Ci: Check if one variable is contained in another one

I tried to check if the content of one variable is part of another variable with: rules: - if: $DATABASES_LIST !~ /^.*$CI_COMMIT_REF_NAME.*$/ when: always but this does not work. I guess this is due to gitlab not expanding the rightmost…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
3
votes
1 answer

Gitlab Runner stucks on docker login

I installed GitLab runner via HelmChart on my Kubernetes cluster While installing via helm I used config values.yaml But my Runner stucks every time at docker login command, without docker login working good I have no idea what is wrong :( Any help…
3
votes
1 answer

dastardly burp with gitlab

I want to use Burp dastardly which is the new DAST tool from portswigger. actually I tried it in Gitlab CI/CD but I got an error! even I tried it in my server. this is how I use it in Gitlab: Burp_DAST: stage: dast image: docker:stable …
Iman
  • 410
  • 7
  • 17
3
votes
1 answer

Gitlab-Ci : npm ERR! code EPIPE on every build while running npm install

I have a basic angular project with two submodules that runs and build perfectly fine on my computer, but fails immediately on gitlab ci. The build is done inside a docker container, as seen below : image: node:16-alpine before_script: - apk…
ALansmanne
  • 271
  • 1
  • 6
  • 17
3
votes
0 answers

Trigger multi-project build on branch, but only if branch exists

I have projects in many git repositories, starting with the base api and then branching outwards. When the API materially changes, I want to verify that downstream projects (that use the particular API) work correctly. I hoped this workflow would be…
Stephen
  • 19,488
  • 10
  • 62
  • 83
3
votes
1 answer

Configure allowed_pull_policies on shared GitLab runner

I'm using GitLab.com's managed CI runners, and I'd like to run my CI jobs using the if-not-present pull policy to avoid the extra minutes it takes to pull the image for each job. Trying to set that value in the .gitlab-ci.yml file gives me this…
Stabby
  • 97
  • 1
  • 6
3
votes
2 answers

GiLab - is it possible to get job id of the project which was executed 4 days ago through GitLab API

we have scheduled pipeline executed once every day. With this setup, i would like to know if its possible to get job id[successful] of the project which was executed 4 days ago through GitLab API
sathiya
  • 279
  • 1
  • 5
  • 17