Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a shell and docker executor on the same unix host?

I would like to use the same host computer to execute Docker builds using the shell executor, as described in the link below, and normal builds using the docker executor.

I would like to be able to start builds of both types on the same host.

I would like to use the debian package provided for Ubuntu and installed via ant from the repository.

https://docs.gitlab.com/ce/ci/docker/using_docker_build.html

In other words, if I run a project to build docker containers, the shell executor should run the commands against docker. If I build a source code project, the docker executor should run my build inside a docker container.

Can someone please describe the steps required to achieve such a configuration.

like image 557
Jörn Guy Süß Avatar asked Oct 12 '17 04:10

Jörn Guy Süß


People also ask

Can a GitLab runner have multiple executors?

The runner monitors the jobs and reports logs and status of the jobs to the Gitlab server. Several executors can be configured for a given instance, and several instances of the same executor can also be deployed.

What is a shell executor?

Shell executor is a basic executor that helps you build a solution locally on a PC that has GitLab Runner installed. Because GitLab Runner is installed on a Linux machine, the essential software must also be installed.

What is runner executor?

Runner Executor: each Runner will define at least one executor. An executor is essentially the environment where the job will be executed.

What Shell does GitLab runner use?

Windows PowerShell and PowerShell Core 7 on GitLab's Windows shared runners. PowerShell Core 7 in Linux Containers with the Docker-Machine Runner.


1 Answers

Run gitlab-runner register multiple times. It will always append new configurations to the same /etc/gitlab-runner/config.toml file.

like image 91
Mikael Lepistö Avatar answered Sep 28 '22 20:09

Mikael Lepistö