You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute a step for deployment events matching the target deployment environment:
369
-
370
-
```yaml
371
-
when:
372
-
- environment: production
373
-
- event: deployment
374
-
```
375
-
376
362
#### `matrix`
377
363
378
364
Execute a step for a single matrix permutation:
@@ -758,7 +744,7 @@ Workflows that should run even on failure should set the `runs_on` tag. See [her
758
744
Woodpecker gives the ability to configure privileged mode in the YAML. You can use this parameter to launch containers with escalated capabilities.
759
745
760
746
:::info
761
-
Privileged mode is only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](./71-project-settings.md#trusted) to enable trusted mode.
747
+
Privileged mode is only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](./75-project-settings.md#trusted) to enable trusted mode.
Copy file name to clipboardexpand all lines: docs/docs/20-usage/25-workflows.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ In case there is a single configuration in `.woodpecker.yaml` Woodpecker will cr
6
6
7
7
By placing the configurations in a folder which is by default named `.woodpecker/` Woodpecker will create a pipeline with multiple workflows each named by the file they are defined in. Only `.yml` and `.yaml` files will be used and files in any subfolders like `.woodpecker/sub-folder/test.yaml` will be ignored.
8
8
9
-
You can also set some custom path like `.my-ci/pipelines/` instead of `.woodpecker/` in the [project settings](./71-project-settings.md).
9
+
You can also set some custom path like `.my-ci/pipelines/` instead of `.woodpecker/` in the [project settings](./75-project-settings.md).
Copy file name to clipboardexpand all lines: docs/docs/20-usage/70-volumes.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Woodpecker gives the ability to define Docker volumes in the YAML. You can use this parameter to mount files or folders on the host machine into your containers.
4
4
5
5
:::note
6
-
Volumes are only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](./71-project-settings.md#trusted) to enable trusted mode.
6
+
Volumes are only available to trusted repositories and for security reasons should only be used in private environments. See [project settings](./75-project-settings.md#trusted) to enable trusted mode.
Woodpecker automatically lints your workflow files for errors, deprecations and bad habits. Errors and warnings are shown in the UI for any pipelines.
4
+
5
+

6
+
7
+
## Running the linter from CLI
8
+
9
+
You can run the linter also manually from the CLI:
10
+
11
+
```shell
12
+
woodpecker-cli lint <workflow files>
13
+
```
14
+
15
+
## Bad habit warnings
16
+
17
+
Woodpecker warns you if your configuration contains some bad habits.
18
+
19
+
### Event filter for all steps
20
+
21
+
All your items in `when` blocks should have an `event` filter, so no step runs on all events. This is recommended because if new events are added, your steps probably shouldn't run on those as well.
22
+
23
+
Examples of an **incorrect** config for this rule:
24
+
25
+
```yaml
26
+
when:
27
+
- branch: main
28
+
- event: tag
29
+
```
30
+
31
+
This will trigger the warning because the first item (`branch: main`) does not filter with an event.
Copy file name to clipboardexpand all lines: docs/docs/91-migrations.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Some versions need some changes to the server configuration or the pipeline conf
11
11
- Deprecated uppercasing all secret env vars, instead, the value of the `secrets` property is used. [Read more](./20-usage/40-secrets.md#use-secrets-in-commands)
12
12
- Deprecated alternative names for secrets, use `environment` with `from_secret`
13
13
- Deprecated slice definition for env vars
14
+
- Deprecated `environment` filter, use `when.evaluate`
14
15
15
16
## 2.0.0
16
17
@@ -66,7 +67,7 @@ Some versions need some changes to the server configuration or the pipeline conf
66
67
67
68
Only projects created after updating will have an empty value by default. Existing projects will stick to the current pipeline path which is `.drone.yml` in most cases.
68
69
69
-
Read more about it at the [Project Settings](./20-usage/71-project-settings.md#pipeline-path)
70
+
Read more about it at the [Project Settings](./20-usage/75-project-settings.md#pipeline-path)
70
71
71
72
- From version `0.15.0` ongoing there will be three types of docker images: `latest`, `next` and `x.x.x` with an alpine variant for each type like `latest-alpine`.
72
73
If you used `latest` before to try pre-release features you should switch to `next` after this release.
0 commit comments