Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .woodpecker/securityscan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ steps:
services:
server:
image: *trivy_plugin
failure: ignore # as we don't care about the exit code
settings:
service: true
db-repository: mirror.gcr.io/aquasec/trivy-db:2
Expand Down
14 changes: 14 additions & 0 deletions docs/docs/20-usage/60-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ services:
- 51820/udp
```

## Stopping

Services that are no longer needed receive a **SIGTERM** signal. If they do not respond, they are forcibly terminated with **SIGKILL**.
If there are services that do not shut down properly and this doesn't matter, you can simply ignore the error:

```diff
services:
- name: database
image: mysql
+ failure: ignore # we don't care how mysql exits
ports:
- 3306
```

## Configuration

Service containers generally expose environment variables to customize service startup such as default usernames, passwords and ports. Please see the official image documentation to learn more.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:

cache:
image: redis
failure: ignore
directory: /tmp/
ports:
- '6379'
6 changes: 6 additions & 0 deletions pipeline/frontend/yaml/linter/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,12 @@
"volumes": {
"$ref": "#/definitions/step_volumes"
},
"failure": {
"description": "How to handle the failure of this step. Read more: https://woodpecker-ci.org/docs/usage/services#stopping",
"type": "string",
"enum": ["fail", "ignore"],
"default": "fail"
},
"backend_options": {
"$ref": "#/definitions/step_backend_options"
},
Expand Down