github.com/alloyci/alloy-runner@v1.0.1-0.20180222164613-925503ccafd6/docs/executors/shell.md (about) 1 # Shell 2 3 The Shell executor is a simple executor that allows you to execute builds 4 locally to the machine that the Runner is installed. It supports all systems on 5 which the Runner can be installed. That means that it's possible to use scripts 6 generated for Bash, Windows PowerShell and Windows Batch. 7 8 ## Overview 9 10 The scripts can be run as unprivileged user if the `--user` is added to the 11 [`alloy-runner run` command][run]. This feature is only supported by Bash. 12 13 The source project is checked out to: 14 `<working-directory>/builds/<short-token>/<concurrent-id>/<namespace>/<project-name>`. 15 16 The caches for project are stored in 17 `<working-directory>/cache/<namespace>/<project-name>`. 18 19 Where: 20 21 - `<working-directory>` is the value of `--working-directory` as passed to the 22 `alloy-runner run` command or the current directory where the Runner is 23 running 24 - `<short-token>` is a shortened version of the Runner's token (first 8 letters) 25 - `<concurrent-id>` is a unique number, identifying the local job ID on the 26 particular Runner in context of the project 27 - `<namespace>` is the namespace where the project is stored on AlloyCI 28 - `<project-name>` is the name of the project as it is stored on AlloyCI 29 30 To overwrite the `<working-directory>/builds` and `<working-directory/cache` 31 specify the `builds_dir` and `cache_dir` options under the `[[runners]]` section 32 in [`config.toml`](../configuration/advanced-configuration.md). 33 34 ## Running as unprivileged user 35 36 If AlloyCI Runner is installed on Linux from the [official `.deb` or `.rpm` 37 packages][packages], the installer will try to use the `alloy_ci_multi_runner` 38 user if found. If it is not found, it will create a `alloy-runner` user and use 39 this instead. 40 41 All shell builds will be then executed as either the `alloy-runner` or 42 `alloy_ci_multi_runner` user. 43 44 In some testing scenarios, your builds may need to access some privileged 45 resources, like Docker Engine or VirtualBox. In that case you need to add the 46 `alloy-runner` user to the respective group: 47 48 ```bash 49 usermod -aG docker alloy-runner 50 usermod -aG vboxusers alloy-runner 51 ``` 52 53 ## Security 54 55 Generally it's unsafe to run tests with shell executors. The jobs are run with 56 the user's permissions (`alloy-runner`) and can "steal" code from other 57 projects that are run on this server. Use it only for running builds on a 58 server you trust and own. 59 60 [run]: ../commands/README.md#alloy-runner-run 61 [packages]: https://packages.alloy-ci.com/runner/alloy-runner