Document rootless container requirements for skip-clone (#5056)

This commit is contained in:
Robert Kaussow 2025-04-15 22:13:31 +02:00 committed by GitHub
parent e2ce937cf6
commit dc80530293
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View File

@ -646,9 +646,9 @@ For more details and examples check the [Advanced usage docs](./90-advanced-usag
## `clone` ## `clone`
Woodpecker automatically configures a default clone step if not explicitly defined. When using the `local` backend, the [plugin-git](https://github.com/woodpecker-ci/plugin-git) binary must be on your `$PATH` for the default clone step to work. If not, you can still write a manual clone step. Woodpecker automatically configures a default clone step if it is not explicitly defined. If you are using the `local` backend, the [plugin-git](https://github.com/woodpecker-ci/plugin-git) binary must be in your `$PATH` for the default clone step to work. If this is not the case, you can still write a manual clone step.
You can manually configure the clone step in your workflow for customization: You can manually configure the clone step in your workflow to customize it:
```diff ```diff
+clone: +clone:
@ -663,7 +663,7 @@ You can manually configure the clone step in your workflow for customization:
- go test - go test
``` ```
Example configuration to override depth: Example configuration to override the depth:
```diff ```diff
clone: clone:
@ -684,7 +684,7 @@ Example configuration to use a custom clone plugin:
### Git Submodules ### Git Submodules
To use the credentials that cloned the repository to clone it's submodules, update `.gitmodules` to use `https` instead of `git`: To use the credentials used to clone the repository to clone its submodules, update `.gitmodules` to use `https` instead of `git`:
```diff ```diff
[submodule "my-module"] [submodule "my-module"]
@ -710,6 +710,10 @@ steps:
## `skip_clone` ## `skip_clone`
:::warning
The default clone step is executed as `root` to ensure that the workspace directory can be accessed by any user (`0777`). This is necessary to allow rootless step containers to write to the workspace directory. If a rootless step container is used with `skip_clone`, the user must ensure a suitable workspace directory that can be accessed by the unprivileged container use, e.g. `/tmp`.
:::
By default Woodpecker is automatically adding a clone step. This clone step can be configured by the [clone](#clone) property. If you do not need a `clone` step at all you can skip it using: By default Woodpecker is automatically adding a clone step. This clone step can be configured by the [clone](#clone) property. If you do not need a `clone` step at all you can skip it using:
```yaml ```yaml

View File

@ -646,9 +646,9 @@ For more details and examples check the [Advanced usage docs](./90-advanced-usag
## `clone` ## `clone`
Woodpecker automatically configures a default clone step if not explicitly defined. When using the `local` backend, the [plugin-git](https://github.com/woodpecker-ci/plugin-git) binary must be on your `$PATH` for the default clone step to work. If not, you can still write a manual clone step. Woodpecker automatically configures a default clone step if it is not explicitly defined. If you are using the `local` backend, the [plugin-git](https://github.com/woodpecker-ci/plugin-git) binary must be in your `$PATH` for the default clone step to work. If this is not the case, you can still write a manual clone step.
You can manually configure the clone step in your workflow for customization: You can manually configure the clone step in your workflow to customize it:
```diff ```diff
+clone: +clone:
@ -663,7 +663,7 @@ You can manually configure the clone step in your workflow for customization:
- go test - go test
``` ```
Example configuration to override depth: Example configuration to override the depth:
```diff ```diff
clone: clone:
@ -684,7 +684,7 @@ Example configuration to use a custom clone plugin:
### Git Submodules ### Git Submodules
To use the credentials that cloned the repository to clone it's submodules, update `.gitmodules` to use `https` instead of `git`: To use the credentials used to clone the repository to clone its submodules, update `.gitmodules` to use `https` instead of `git`:
```diff ```diff
[submodule "my-module"] [submodule "my-module"]
@ -710,6 +710,10 @@ steps:
## `skip_clone` ## `skip_clone`
:::warning
The default clone step is executed as `root` to ensure that the workspace directory can be accessed by any user (`0777`). This is necessary to allow rootless step containers to write to the workspace directory. If a rootless step container is used with `skip_clone`, the user must ensure a suitable workspace directory that can be accessed by the unprivileged container use, e.g. `/tmp`.
:::
By default Woodpecker is automatically adding a clone step. This clone step can be configured by the [clone](#clone) property. If you do not need a `clone` step at all you can skip it using: By default Woodpecker is automatically adding a clone step. This clone step can be configured by the [clone](#clone) property. If you do not need a `clone` step at all you can skip it using:
```yaml ```yaml