89
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 ...
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/...
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.
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 ...
13
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 ...
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 ...
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 ....
11
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 -...
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 ...
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 ...
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
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 ...
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 ...
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.
...
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 ...
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.
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 ...
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 ...
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 ...
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-...
4
votes
Accepted
What's the practice to perform a releasing with Git?
Consider to substitute the version in POM by the git describe upon build without hardcoding the version in your repository, you could do this with e.g. sed from below version_slug.
export git_version=...
4
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. ...
4
votes
Internal Server Error while running docker-compose to install Gitlab
In the error message you presented your system is reporting port 443 is already in use. You need to confirm which ports you have in use for other services.
listen tcp 0.0.0.0:443: bind: address ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gitlab × 259gitlab-ci-runner × 86
docker × 58
continuous-integration × 46
cicd × 39
git × 22
kubernetes × 20
continuous-deployment × 17
jenkins × 16
yaml × 10
docker-compose × 9
helm × 9
jenkins-pipeline × 8
deployment × 8
terraform × 7
docker-registry × 7
pipeline × 7
amazon-web-services × 6
github × 5
python × 5
build-pipeline × 5
docker-in-docker × 5
continuous-delivery × 4
node.js × 4
amazon-ec2 × 3