95 votes
Accepted

Is there a [ci skip] option in GitLab CI?

Yes, there is: If your commit message contains [ci skip] or [skip ci], using any capitalization, the commit will be created but the pipeline will be skipped. Alternatively, one can pass the ci.skip ...
Peterino's user avatar
  • 1,066
14 votes
Accepted

Is it possible to have multiple gitlab-ci files in a single repo?

No, you can't have multiple gitlab-ci files per repository. You can see more information in the following links: https://gitlab.com/gitlab-org/gitlab-foss/issues/18157 https://gitlab.com/gitlab-org/...
Aykut Açikel's user avatar
14 votes
Accepted

Can I run multiple pipelines in a single GitLab repo using GitLab CI/CD?

Yes, you can use the rules syntax. You can use this in combination with regex for commit message, ci_pipeline_source or any other available CI variables. job1: script: - do something on ...
zm31's user avatar
  • 381
13 votes
Accepted

Gitlab doesn't open Word files

You can only view text/source code files, Markdown files and images. Gitlab doesn't have a preview option for other files such as proprietary word processors.
Jeeva's user avatar
  • 436
13 votes
Accepted

How to tag source code using gitlabCI

I tried to change docker image and added couple steps for git tag. Below is the answer worked for me, image: maven stages: - build - deploy - tag maven_build: stage: build script: - mvn clean ...
pandey's user avatar
  • 949
12 votes
Accepted

Is there any way to break long command into multi lines in GitlabCI

Since .gitlab-ci.yml is a Yaml file, then just use it's syntax. For example, you may use >: image: ubuntu before_script: - 'which ssh-agent || ( apt-get update -y && apt-get install ...
Yasen's user avatar
  • 682
11 votes

Jenkins shows the job as failed if there is nothing to commit to gitlab

In my automatic jenkins job, launched daily, if there are no changes the git commit command returns 1. That will mark the build as failed. To solve this problem I use these two commands in my shell ...
Francesco Fornari's user avatar
11 votes

Trigger Jenkins job from Gitlab CI with parameters

Here's the way I do it: no plugin required, just triggering Jenkins api from gitlab-ci. Gitlab-CI I will assume you have a gitlab-ci runner installed and configured. First, you need to have a ....
avi.elkharrat's user avatar
10 votes

Changing the build intermediate paths for gitlab-runner

Conceptually, this approach is not the way to go; the build directory is not a deployment directory, it's a temporary directory, to build or to deploy from, whereas on a shell executor this could be ...
Danny Goossen's user avatar
10 votes
Accepted

Where does the string docker.example.com in my GitLab CI job come from?

It's a placeholder domain name for connecting over SSH. It doesn't mean that it's connecting to docker.example.com. I ran into a similar error when using a Docker client over SSH. The error message ...
Nick ODell's user avatar
9 votes
Accepted

Gitlab CI error during connect: Get http://docker:2375/v1.40/containers/json?all=1: dial tcp: lookup docker on xx.xx.xx.x:xx: no such host

I might have skipped the optional installation of docker in my Ubuntu instance, so if the gitlab runner is going to use Docker, remember to install it: curl -sSL https://get.docker.com/ | sh I got ...
punkbit's user avatar
  • 349
7 votes
Accepted

Where can I find older versions of GitLab Runner?

As described in the documentation you are following to install on the first paragraph: You can download a binary for every available version as described in Bleeding Edge - download any other ...
Tensibai's user avatar
  • 11.4k
7 votes

Using gitlab-ci to cache maven repository

To me the easiest route to this would be to have an instance of an artifactory running. There are several choices out there many of which have an open-source, community or free version that would ...
Newtopian's user avatar
  • 1,956
7 votes

Is it possible to have multiple gitlab-ci files in a single repo?

You are not able to create multiple .gitlab-ci.yml but you can manage to have what you want. You currently have multiple software in the same repository with the same CI/CD Pipeline or jobs for your ...
Alexandre Burgoni's user avatar
7 votes
Accepted

Colored logging messages from Python script within GitLab CI

Set the LOGURU_COLORIZE variable in your Docker container. run: stage: run image: $CI_REGISTRY_IMAGE:latest variables: LOGURU_COLORIZE: "true" script: - ls -...
swysocki's user avatar
  • 818
6 votes
Accepted

How to configure gitlab-runner to run in the same docker host as gitlab?

Management Summary Set the pull_policy to "never" in the [runners.docker] section by calling: docker exec -it gitlab-runner \ vi /etc/gitlab-runner/config.toml Detailed Description It seemed the ...
tgr's user avatar
  • 448
6 votes
Accepted

Jenkins shows the job as failed if there is nothing to commit to gitlab

In order to get a success, you need to avoid non-zero exit codes. A simple solution would be to change the last line of your script to git commit -a -m 'Changes pushed by Jenkins' || true, but better ...
Jesusaur's user avatar
  • 198
6 votes
Accepted

Jenkins Pipeline "Build when a change is pushed to GitLab"

Looks like you are using the Gitlab plugin for jenkins? if so this link should be of help https://github.com/jenkinsci/gitlab-plugin#declarative-pipeline-jobs
Nune Isabekyan's user avatar
6 votes

How should CI/CD deploy to production environment - copy artifacts or git pull from the server?

There are lots of bad examples on the Internet. Doing a git pull to distribute code is fabulous for development, but prone to all sorts of issues in practice. It should not be used for production ...
chicks's user avatar
  • 1,848
5 votes
Accepted

fatal: ambiguous argument 'master': unknown revision or path not in the working tree

The error looks like you're using a non-existent reference (branch/tag). Try specifying the correct branch and tag using the branch/tag options. You can also use the commit hash directly using ref ...
grumpyops's user avatar
  • 334
5 votes
Accepted

Multiple paths with different expiry time in gitlab-ci runners

This has been answered over on SO using a work around seeing as it doesn't seem possible according to the documents. Basically, this can be done in 3 stages. Stage 1: Build and store all artifacts. ...
Rekovni's user avatar
  • 933
5 votes
Accepted

What OS should a master node CI virtual machine be?

I think the major deciding factor is the expertise of you and the rest of your company in the chosen OS. If you are a Windows shop, and your company is willing to leverage the cost of the node, it's ...
Preston Martin's user avatar
  • 3,278
5 votes
Accepted

GitLab CI/CD job without pulling LFS files?

Yes, full cloning of LFS files can be restricted! By default, GitLab will clone your repo into the CI/CD build directory. To limit the clone from downloading the LFS files, tell it not to do it. ...
rickhg12hs's user avatar
5 votes
Accepted

Using Jenkins gitlab token to make an API call

Try something similar to the following: environment { GITLAB_API_TOKEN = credentials('gitlab_api_token'). } or withCredentials([[ $class: 'com.dabsquared.gitlabjenkins.connection....
TheFiddlerWins's user avatar
5 votes

Set job start timeout in Gitlab CI

There are three types of timeouts in Gitlab CI: Project timeout Runner timeout Jobs timeout Project timeout According to GitLab docs: Timeout defines the maximum amount of time in minutes that a ...
Yasen's user avatar
  • 682
5 votes

Git keeps asking for ssh passphrase when SSH is already defined in GitLab

You can try adding your passphrase to the keychain using ssh-add -K, this will ask you the passphrase for the first time and later on it won't ask.
AV Reddy's user avatar
4 votes
Accepted

Gitlab Runner not running scripts with Windows shell configuration

stages are required stages: - stage1 stage1: stage: stage1 script: - echo hello Could you try the following: before_script: - pushd . && uru 233 && popd && set ...
030's user avatar
  • 13.2k
4 votes

Gitlab doesn't open Word files

A word document is not a source document that is fit for version control, it's a proprietary binary file. For version control, try to learn a real source document like e.g. Markdown or AsciiDoc. In ...
Danny Goossen's user avatar
4 votes
Accepted

Multiple runners for all projects OR single runner per project

After some research i found out that shared runners are good for the projects that are very much the same, and specific runners are better for the projects that are not like any project. Shared ...
SurudoiRyu's user avatar
4 votes
Accepted

CI/CD for microservices in monorepo on Gitlab

Monorepos are nice because it eliminates the technical constraints between multiple projects. This does however open the door to other complications within your repository (naming conventions, cross-...
Preston Martin's user avatar
  • 3,278

Only top scored, non community-wiki answers of a minimum length are eligible