Questions tagged [gitlab]

GitLab is an open source Git repository manager with issue tracking and wiki as well as continuous integration features. Use this tag for programming questions related to the GitLab API or similar; questions about general usage are considered off-topic.

GitLab is open source software to collaborate on code. It can be considered an open source self-hosted GitHub, but GitLab.com also provides Git hosting in the way GitHub does, and you can also have private repositories for free.

Features

GitLab has the following features:

Screens

GitLab-demo

There are three versions available for GitLab:

  • Community Edition (CE)
  • Enterprise Edition Starter (EES)
  • Enterprise Edition Premium (EEP)

Resources

  1. Source code (GitHub mirror)
  2. Documentation
  3. Community
  4. Mailing list
  5. Official blog
  6. GitLab Continuous Integration
17630 questions
6
votes
2 answers

MongoDB server doesn't start at gitlab runner using gitlab-ci

right now I'm in the middle at developing an application using Ruby and Mongo. But I got stuck when I deploy the application using gitlab-ci where it seems that mongo server doesn't start at test environment on gitlab runner. Here are my…
Robert John
  • 61
  • 1
  • 2
6
votes
1 answer

Configure Gitlab CI stages to not run in parallel

I have a Gitlab CI pipeline with multiple stages. By default, the same stage between two jobs will be run in parallel. One of the stages I have is an integration test stage that should only have one running instance at a time since it relies on…
mattherman
  • 456
  • 4
  • 15
6
votes
2 answers

Clear Git branch that doesn't exists in VS Code

when I working with gitlab, for some feature I create new branch and work on it and after commit,push,merge I remove branch that was I worked on it from gitlab and then click on Sync command in VS Code git command to sync. but all of branches that i…
MBehtemam
  • 7,865
  • 15
  • 66
  • 108
6
votes
2 answers

How to setup GitLab+runners to cache Docker layers

We have our own gitlab repo. We have our own runners. Hows does one set up the runners and gitlab up to be able to cache docker layers. An example below of a .gitlab-ci.yml file: before_script: - docker version test: stage: test script: -…
basickarl
  • 37,187
  • 64
  • 214
  • 335
6
votes
1 answer

GitLab count total number of issues

I would like to count all issues on my gitlab project using api. Below the command that I'm using: curl --header "PRIVATE-TOKEN:xxxxxxx" https://gitlab.myapp.com/api/v4/groups/xx/issues?scope=all I've also tried to replace groups with project. We…
ClaudioM
  • 1,418
  • 2
  • 16
  • 42
6
votes
3 answers

Publish coverage result from gitlab project

On a project at gitlab.com I run tests and coverage analysis. I'd like to publish the results (an HTML file). I read this page and I have an entry in the .gitlab.yml file to publish the results: pages: stage: publish dependencies: -…
user2414208
  • 425
  • 6
  • 19
6
votes
3 answers

Access artifacts from previous run of same job

I want to use Gitlab CI/CD for deployment. The same codebase is used to deploy to different environments and requires a statefile (state of environment) for deployment, which need to be updated after the deployment, and fetched before deployment. As…
muffel
  • 7,004
  • 8
  • 57
  • 98
6
votes
2 answers

Gitlab-ci: how to disable manual step when artifact is expired?

Due to disk space limitations I want to expire my artifacts within a few hours. Gitlab-CI supports this, by defining the time in expire_in. This works perfectly, but I have a manual deploy step (click a button to start the deploy). The deploy…
dbrekelmans
  • 951
  • 8
  • 11
6
votes
1 answer

GitLab CI Django and Postgres

I am having an issue getting GitLab's CI to work with my Django project. I am using a postgres server and it appears I have set something up wrong. Any help would be much appreciated! The error: django.db.utils.OperationalError: could not connect…
Tyler Bell
  • 837
  • 10
  • 30
6
votes
1 answer

How to pass GitLab variable in multiline script with json input?

I'm searching for a way to pass the $CI_COMMIT_TAG within my .gitlab-ci.yml to a multiline curl command with json data. But every time I do so I get the variable-key-string istead of the value. production: stage: deploy script: - "openssl…
Thomas Schwärzl
  • 9,518
  • 6
  • 43
  • 69
6
votes
1 answer

How can one deploy build artifacts from GitLab CI to an Azure app service?

I have a repository hosted on gitlab.com, it has several build jobs associated with it. I would like for an ability to deploy the compiled artifacts of any given build (generally in the form of HTML/CSS/JavaScript compiled files) to azure. All of…
Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308
6
votes
1 answer

Gitlab: piping commands with grep not working?

The following command in a job script: STATUS_ID=$(grep -Eo "Status Code [0-9]+: Done" somefile | grep -Eo "[0-9]+") Seems to be causing the following ci lint error: script config should be a string or an array of strings The command works fine…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
6
votes
1 answer

Execute mysql command before test script on GitLab CI

I want to create the test database before my test script executes. I have included the mysql service, but I can't find a way to run mysql command. I run mysql ... in before-script, but it keep complaining /bin/bash: line 57: mysql: command not…
JiaChen ZENG
  • 711
  • 8
  • 16
6
votes
2 answers

Use semver or a timestamp in gitlab piplelines

I'm using GitLab pipelines and have defined my build defintion in the .gitlab-ci.yml file. I'm using this to build docker containers. Simple question. Is there a way I can tag my docker containers with either a semver from gitlab or a timestamp. The…
Remotec
  • 10,304
  • 25
  • 105
  • 147
6
votes
1 answer

How to prevent forked git repo from diverging

The following series of git commands is leading to repos to diverge. What am I doing wrong? Fork project from GitLab call the parent project 'upstream' Clone repo from forked project Make edits locally in branch master Commit local edits, push…
BigBrownBear00
  • 1,378
  • 2
  • 14
  • 24