gitlab.com/jfprevost/gitlab-runner-notlscheck@v11.11.4+incompatible/docs/executors/README.md (about) 1 # Executors 2 3 GitLab Runner implements a number of executors that can be used to run your 4 builds in different scenarios. If you are not sure what to select, read the 5 [I am not sure](#i-am-not-sure) section. 6 Visit the [compatibility chart](#compatibility-chart) to find 7 out what features each executor does and does not support. 8 9 To jump into the specific documentation for each executor, visit: 10 11 - [SSH](ssh.md) 12 - [Shell](shell.md) 13 - [Parallels](parallels.md) 14 - [VirtualBox](virtualbox.md) 15 - [Docker](docker.md) 16 - [Docker Machine (auto-scaling)](docker_machine.md) 17 - [Kubernetes](kubernetes.md) 18 19 ## Selecting the executor 20 21 The executors support different platforms and methodologies for building a 22 project. The table below shows the key facts for each executor which will help 23 you decide which executor to use. 24 25 | Executor | SSH | Shell | VirtualBox | Parallels | Docker | Kubernetes | 26 |:--------------------------------------------------|:----:|:-------:|:----------:|:---------:|:------:|:----------:| 27 | Clean build environment for every build | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | 28 | Migrate runner machine | ✗ | ✗ | partial | partial | ✓ | ✓ | 29 | Zero-configuration support for concurrent builds | ✗ | ✗ (1) | ✓ | ✓ | ✓ | ✓ | 30 | Complicated build environments | ✗ | ✗ (2) | ✓ (3) | ✓ (3) | ✓ | ✓ | 31 | Debugging build problems | easy | easy | hard | hard | medium | medium | 32 33 1. It's possible, but in most cases it is problematic if the build uses services 34 installed on the build machine 35 2. It requires to install all dependencies by hand 36 3. For example using [Vagrant](https://www.vagrantup.com/docs/virtualbox/ "Vagrant documentation for VirtualBox") 37 38 ### I am not sure 39 40 #### Shell Executor 41 42 **Shell** is the simplest executor to configure. All required dependencies for 43 your builds need to be installed manually on the same machine that the Runner is 44 installed on. 45 46 #### Virtual Machine Executor (VirtualBox / Parallels) 47 48 This type of executor allows you to use an already created virtual machine, which 49 is cloned and used to run your build. We offer two full system virtualization 50 options: **VirtualBox** and **Parallels**. They can prove useful if you want to run 51 your builds on different operating systems, since it allows the creation of virtual 52 machines on Windows, Linux, OSX or FreeBSD, then GitLab Runner connects to the 53 virtual machine and runs the build on it. Its usage can also be useful for reducing 54 infrastructure costs. 55 56 #### Docker Executor 57 58 A great option is to use **Docker** as it allows a clean build environment, 59 with easy dependency management (all dependencies for building the project can 60 be put in the Docker image). The Docker executor allows you to easily create 61 a build environment with dependent [services](https://docs.gitlab.com/ee/ci/services/README.html), 62 like MySQL. 63 64 #### Docker Machine 65 66 The **Docker Machine** is a special version of the **Docker** executor 67 with support for auto-scaling. It works like the normal **Docker** executor 68 but with build hosts created on demand by _Docker Machine_. 69 70 #### Kubernetes Executor 71 72 The **Kubernetes** executor allows you to use an existing Kubernetes cluster 73 for your builds. The executor will call the Kubernetes cluster API 74 and create a new Pod (with a build container and services containers) for 75 each GitLab CI job. 76 77 #### SSH Executor 78 79 The **SSH** executor is added for completeness, but it's the least supported 80 among all executors. It makes GitLab Runner connect to an external server 81 and runs the builds there. We have some success stories from organizations using 82 this executor, but usually we recommend using one of the other types. 83 84 ## Compatibility chart 85 86 Supported features by different executors: 87 88 | Executor | SSH | Shell | VirtualBox | Parallels | Docker | Kubernetes | 89 |:---------------------------------------------|:----:|:-------:|:----------:|:---------:|:------:|:----------:| 90 | Secure Variables | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 91 | GitLab Runner Exec command | ✗ | ✓ | ✗ | ✗ | ✓ | ✓ | 92 | gitlab-ci.yml: image | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | 93 | gitlab-ci.yml: services | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | 94 | gitlab-ci.yml: cache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 95 | gitlab-ci.yml: artifacts | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 96 | Absolute paths: caching, artifacts | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | 97 | Passing artifacts between stages | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 98 | Use GitLab Container Registry private images | n/a | n/a | n/a | n/a | ✓ | ✓ | 99 | Interactive Web terminal | ✗ | ✓ (bash)| ✗ | ✗ | ✓ | ✓ | 100 101 Supported systems by different shells: 102 103 | Shells | Bash | Windows Batch | PowerShell | 104 |:-------:|:-----------:|:-------------:|:----------:| 105 | Windows | ✓ | ✓ (default) | ✓ | 106 | Linux | ✓ (default) | ✗ | ✗ | 107 | OSX | ✓ (default) | ✗ | ✗ | 108 | FreeBSD | ✓ (default) | ✗ | ✗ | 109 110 Supported systems for interactive web terminals by different shells: 111 112 | Shells | Bash | Windows Batch | PowerShell | 113 |:-------:|:-----------:|:-------------:|:----------:| 114 | Windows | ✗ | ✗ | ✗ | 115 | Linux | ✓ | ✗ | ✗ | 116 | OSX | ✓ | ✗ | ✗ | 117 | FreeBSD | ✓ | ✗ | ✗ |