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

How to correctly specify stop action for environment in Gitlab

I have the following (simplified) .gitlab-ci.yml file for a project. It successfully creates an environment that is visible from the UI. stages: - deploy deploy_test: image: #myimage stage: deploy environment: name: test url:…
Tschösi
  • 491
  • 3
  • 13
3
votes
2 answers

How to set DOCKER_BUILDKIT=1 from .gitlab-ci.yml?

I have a working Dockerfile that requires execution with BuildKit support. Question: how can I build the dockerfile from gitlab-ci and set DOCKER_BUILDKIT=1 globally? .gitlab-ci.yml: image: docker:20 variables: DOCKER_DRIVER:…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
3
votes
1 answer

Cancel GitLab pipeline from job OR how to flush output buffer

Disclaimer: this is a cross-post from https://forum.gitlab.com/t/cancel-pipeline-from-job-or-how-to-flush-output-buffer/67008 Not for the first time I am looking for ways to cancel a pipeline from within a job. True, I can have a job with a script…
Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
3
votes
1 answer

How can GitLab Bot accounts use the dependency proxy?

We've recently adopted the GitLab dependency proxy for our project on a self-hosted GitLab instance. This works fine for normal users, but fails for pipelines created via the API using a project or group access token, regardless of access…
Mastacheata
  • 1,866
  • 2
  • 21
  • 32
3
votes
1 answer

How to run Job when Pipeline was triggered manually

I setup jobs to run only when pushing/merging to branch "dev", but I also want it so I'm able to run them if I trigger that pipeline manually. Something like this: test: stage: test build: stage: build …
arielnmz
  • 8,354
  • 9
  • 38
  • 66
3
votes
2 answers

Use cache docker image for gitlab-ci

I was wondering is it possible to use cached docker images in gitlab registry for gitlab-ci? for example, I want to use node:16.3.0-alpine docker image, can I cache it in my gitlab registry and pull it from that and speed up my gitlab ci instead of…
Jessica
  • 127
  • 2
  • 10
3
votes
0 answers

git push via gitlab CI runner failed with 403 error

I have a gitlab runner for git project A, I want the CI runner run some scripts everytime there ar commits from A and push the results to project B, but when pushing to project B but I got: "fatal: unable to access…
sxie
  • 41
  • 2
3
votes
1 answer

gitlab: How to have a another gitlab-ci.yml and use it whenever i want, instead of automatic triggering

I have a gitlab-ci.yml file, which gets triggered when I commit changes. I want to have another file gitlab-ci-notrigger.yml which will not be triggered. But I can use this to run pipeline whenever i want manually
Santhosh
  • 9,965
  • 20
  • 103
  • 243
3
votes
2 answers

How to separate docker build and publish scripts into separate stages in Gitlab CI

I would like to build and publish docker images in two separate stages: build publish Unfortunately, Gitlab runs those stages inside different workers - ci-runner-worker11 and ci-runner-worker15. Therefore images built in the first stage are not…
ziemowit141
  • 465
  • 3
  • 18
3
votes
1 answer

How do I authenticate using a managed identity from gitlab-ci to push a docker container from gitlab registry to Azure web service?

I have researched the way to push docker images from gitlab container registry to an azure resource: Pushing Docker image from gitlab-ci to Azure Container Registry I have also found the documentation to create managed identities (both…
aknott
  • 195
  • 3
  • 11
3
votes
0 answers

pip3 install pandas failing in gitlab-ci.yaml

pip3 install pandas failing in gitlab-ci.yaml It is failing as shown below, pasting logs. I am getting this error once I run my yaml file, for rest of the pip install it is working fine. It is failing only for Pandas. I have left it like…
3
votes
2 answers

Gitlab deployment_tier purpose?

Hello can anybody tell me what exactly the deployment_tier for environments is for in…
Marcel
  • 1,606
  • 16
  • 29
3
votes
0 answers

How to validate kaniko build image

I tried following this to build a docker image using Kaniko in Gitlab. build: stage: build image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] script: - mkdir -p /kaniko/.docker - echo…
ZZzzZZzz
  • 1,800
  • 3
  • 29
  • 51
3
votes
2 answers

Prevent Gitlab pipeline fail when nothing to commit

I had realized this pipeline send: image: node:latest before_script: - git config --global user.email "gituser@example.com" - git config --global user.name "Gitlab CI" script: - npm install - npm run start $GMAIL_PW - echo…
Dennis A. Boanini
  • 477
  • 1
  • 5
  • 19
3
votes
1 answer

how to load variables from gitlab to .env VueJS

I want to load Gitlab variables to .env.production in a VueJS application so I can use process.env.VUE_APP_VARIABLE_NAME. What I have done: Create some variables in GitLab CI/CD settings Create a .env.production…
Quyết
  • 502
  • 5
  • 12