Docs: cleared how-to-install, mention labels as a way to ensure that local agent actually picks up the job

This commit is contained in:
Szymon Nowicki 2025-02-16 13:59:06 +01:00
parent 7a93b7e680
commit 328080c6e7

View file

@ -27,6 +27,16 @@ code and execute commands.
In order to use this backend, you need to download (or build) the In order to use this backend, you need to download (or build) the
[agent](https://github.com/woodpecker-ci/woodpecker/releases/latest), configure it and run it on the host machine. [agent](https://github.com/woodpecker-ci/woodpecker/releases/latest), configure it and run it on the host machine.
## Installation
Installation is possible as a build from source or pre-build packages available on the [woodpecker GitHub release page](https://github.com/woodpecker-ci/woodpecker/releases/latest).
Once installed (e.g. via `dpkg -i ...`) it will add a systemd service called `woodpecker-agent`.
You may need to tune up that service config by for example adjusting the user it runs as.
Additionally, you must set up the [environment variables](../15-agent-config.md) for the agent in the environment referenced by the systemd service (e.g. `/etc/woodpecker/woodpecker-agent.env`).
## Usage ## Usage
To enable the local backend, set the following as an agent environment variable: To enable the local backend, set the following as an agent environment variable:
@ -35,6 +45,17 @@ To enable the local backend, set the following as an agent environment variable:
WOODPECKER_BACKEND=local WOODPECKER_BACKEND=local
``` ```
For more configuration options, see the [Agent configuration](../15-agent-config.md) page.
Once the agent is running, you can ensure your pipeline only is being used by that kind of agent by using proper [labels](../../20-usage/20-workflow-syntax.md#labels) configuration.
e.g:
```yaml
labels:
backend: local
```
### Shell ### Shell
The `image` entrypoint is used to specify the shell, such as `bash` or `fish`, that is The `image` entrypoint is used to specify the shell, such as `bash` or `fish`, that is