mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-02-13 21:00:00 +00:00
document how to ignore failure on services (#6106)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
@@ -34,6 +34,7 @@ steps:
|
|||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: *trivy_plugin
|
image: *trivy_plugin
|
||||||
|
failure: ignore # as we don't care about the exit code
|
||||||
settings:
|
settings:
|
||||||
service: true
|
service: true
|
||||||
db-repository: mirror.gcr.io/aquasec/trivy-db:2
|
db-repository: mirror.gcr.io/aquasec/trivy-db:2
|
||||||
|
|||||||
@@ -37,6 +37,20 @@ services:
|
|||||||
- 51820/udp
|
- 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
|
## 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.
|
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.
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ services:
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
image: redis
|
image: redis
|
||||||
|
failure: ignore
|
||||||
directory: /tmp/
|
directory: /tmp/
|
||||||
ports:
|
ports:
|
||||||
- '6379'
|
- '6379'
|
||||||
|
|||||||
@@ -879,6 +879,12 @@
|
|||||||
"volumes": {
|
"volumes": {
|
||||||
"$ref": "#/definitions/step_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": {
|
"backend_options": {
|
||||||
"$ref": "#/definitions/step_backend_options"
|
"$ref": "#/definitions/step_backend_options"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user