How to trigger automatic build in gitlab CI on commit to non-default branch?

I have a project in GitLab that is integrated with Gitlab CI. Every push to master shedules a build of the project. However, when a new branch is created and pushed into repository, build is not...

Use GitLab CI to run tests locally?

If a GitLab project is configured on GitLab CI, is there a way to run the build locally? I don't want to turn my laptop into a build "runner", I just want to take advantage of Docker and...

Using GitLabCI with C#

I've been working on a C# application and wanted to try the GitLab CI out. All I can see is Ruby and can't find any information on how to build a C# application using it. When I run the test...

Run several maven projects within one repository with GitLab CI

I have one repository in GitLab which contains multiple maven projects in different subfolders. For example, let us say it is: /ProjectA/pom.xml /ProjectB/pom.xml I have two questions here: Can...

How to solve the "remote: You are not allowed to upload code." error on GitLab CI/CD job?

I am currently trying to use GitLab to run a CI/CD job that runs a Python file that makes changes to a particular repository and then commits and pushes those changes to master. I also have a role...

How do you push to a gitlab repo using a gitlab-ci job?

I am new to GitLab CI/CD jobs, but I'm trying to set up a Python script that when pushed to GitLab, triggers the CI/CD job to run it, and call an internal function that pushes to GitLab again...

how to pull from a private registry in gitlab CI, with docker DIND

actually I'm using gitlab runners, with docker executor, and I'm trying to pull some docker images to do some tests, and to preserve my network connection, I've created a private docker registry,...

Tests using embedded postgres fail with Illegal State Exception

I'm running some tests against an embedded postgres database using otj-pg-embedded. While the tests run fine locally they fail when run by Gitlab-CI with an Illegal State Exception. Gitlab CI...

Execute external bash script inside GitLab-ci Docker build

I would like to execute an external (on the local machine) bash script from gitlab-ci.yml which uses the docker:stable image. I would like to execute startup.sh located outside the gitlab docker...

ERROR: Preparation failed: Getwd: getwd: no such file or directory

Gitlab runner throw ERROR: Preparation failed: Getwd: getwd: no such file or directory? gitlab version is: GitLab Community Edition 8.6.4 gitlab-runner version: 1.11.5 My CI throw ERROR:...

Error using the PWD to define variables in .gitlab-ci.yml

I just noticed that when the PWD variable is accessed under script, it works as one would expect, for instance: test: script: - docker run --rm -v $PWD/wd image [options] But this fails...

Share env variables between Docker-Compose and GitLab-CI

Note: I've omitted some details, stages and settings from the following config files to make the post shorter and the question more "readable". Please comment if you believe essential details are...

GitLab Runner - How to allow only one Pipeline run at a time

I am new to GitLab and facing a problem where if I trigger two pipelines at the same time on same gitlab-runner, they both run in parallel and results in failure. What I want is to limit the run...

register gitlab-runner to gitlab from docker

i am new to docker. i run gitlab ce container with this command: docker run --detach --hostname localhost --publish 443:443 --publish 80:80 --name gitlab --restart always...

How to check if the git branch is newly created or not?

Is there is a way to check if the git branch is newly created For example git checkout master git checkout -b feature I have a requirement that I need to identify that a given branch is brand...

Terraform: Error acquiring the state lock: ConditionalCheckFailedException

I got the following error during a terraform plan which occured in my pipeline: Error: Error locking state: Error acquiring the state lock: ConditionalCheckFailedException: The conditional request...

Does git stash, stashes only staged files or even Unstaged and Untracked files?

I've made few changes to my code on a wrong branch(dev). I wanted to shift all my changes to master branch, I got some lead from here, but I'm not clear whether the git stash stashes only *staged*...

Gitlab dpl issue with ruby version

I have a node app that I am deploying through Gitlab. I am using docker image node:12.8.0. Recently it has been failing deployment with the following error $ dpl --provider=heroku...

Spring Boot Maven Plugin > 2.4.x build image pubish on gitlab registry

I'm currently developing a GitLab CI/CD Pipeline which compiles, tests and builds a standard Spring Boot application. I want to package it in a docker image and publish that to the GitLab registry...

How do I delete/unregister a GitLab runner

I have registered a personal GitLab runner several months ago, which I no longer use. How do I completely delete it so that it does not show up on my GitLab CI/CD settings page?

Python ARM in Docker - Installing requirements takes ages

I want to run a Docker container with some Python bots inside. These scripts need libraries like pandas, numpy and matplotlib. Everything works great in an x86 environment, but building the image...

generating artifacts in gitlab: Allure reporter for WDIO

I encounter an issue at last step of my CI/CD setup using gitlab. My testing framework consists from webdriverIO + Typescript + allure-reporter. I get an error when I want to generate the report...

gitlab-runner: prepare environment failed to start process pwsh in windows

On a new WIN10 machine after installing gitlab-runner with shell executor(i.e powershell) and starting a CI build throws following error: Preparing environment ERROR: Job failed (system failure):...

Cannot run gradle test tasks because of java.lang.NoClassDefFoundError: jdk/internal/reflect/GeneratedSerializationConstructorAccessor1

I have an android project where I cannot run anymore all the test gradle tasks locally (I have 3 different flavors in this project). I have this error message 50 times before the tasks fail. I...

Gitlab CI Pipeline "remote: You are not allowed to upload code."

From my question "Gitlab CI: get list of files changed since last run" I discovered that Gitlab CI has no variable that tracks the SHA-ID of the last commit on which the pipeline has been...

How to define rules in gitlab "stages" so that no need to define separate rules for jobs

Suppose there are 4 jobs are define in stages . stages: build test deploy upload Now test, deploy and upload only run when pipeline trigger manually. We can define rule on separate jobs for this...

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select <database and table> = BASE_TABLE ))

I have this error in gitlab CI console. SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema =...

Not able to execute GitLab Runner in Kubernetes cluster: cannot create resource "secrets" in API group "" in the namespace "gitlab"

Currently I'm facing the issue: ERROR: Job failed (system failure): prepare environment: setting up credentials: secrets is forbidden: User "system:serviceaccount:default:gitlab-runner" cannot...

Gitlab Cloud run deploy successfully but Job failed

Im having an issue with my CI/CD pipeline , its successfully deployed to GCP cloud run but on Gitlab dashboard the status is failed. I tried to replace images to some other docker images but it...

GitLab job randomly failing with Selenium showing white screen

I'm running simple selenium test on GitLab CI (free tier). Sometimes I get failing job because elements where not located (after taking screenshot it appears that page is displayed as white...