From b91befa344dd1e606cf48d3c51b8d702c0112840 Mon Sep 17 00:00:00 2001 From: "m.huber" Date: Wed, 11 Feb 2026 05:20:11 +0100 Subject: [PATCH 1/3] document how to ignore failure on services --- .woodpecker/securityscan.yaml | 1 + docs/docs/20-usage/60-services.md | 14 ++++++++++++++ .../linter/schema/.woodpecker/test-service.yaml | 1 + pipeline/frontend/yaml/linter/schema/schema.json | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/.woodpecker/securityscan.yaml b/.woodpecker/securityscan.yaml index 7382a027b85..ee396b62ca6 100644 --- a/.woodpecker/securityscan.yaml +++ b/.woodpecker/securityscan.yaml @@ -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 diff --git a/docs/docs/20-usage/60-services.md b/docs/docs/20-usage/60-services.md index 3697fef4861..ab2ac366364 100644 --- a/docs/docs/20-usage/60-services.md +++ b/docs/docs/20-usage/60-services.md @@ -37,6 +37,20 @@ services: - 51820/udp ``` +## Stopping + +Services once not needed anymore get **SIGTERM** signal. If they don't honor it they will just get killed via **SIGKILL**. +If you have services that don't gracefully stop and it does not matter, just ignore the failure: + +```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. diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yaml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yaml index 70725ff11e6..bc4c350a768 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yaml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-service.yaml @@ -16,6 +16,7 @@ services: cache: image: redis + failure: ignore directory: /tmp/ ports: - '6379' diff --git a/pipeline/frontend/yaml/linter/schema/schema.json b/pipeline/frontend/yaml/linter/schema/schema.json index 51e1bed7ce2..5b20b1ee024 100644 --- a/pipeline/frontend/yaml/linter/schema/schema.json +++ b/pipeline/frontend/yaml/linter/schema/schema.json @@ -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" }, From ca0afee5eb71d5105d1fc3c1d3584c65de12bfbc Mon Sep 17 00:00:00 2001 From: "m.huber" Date: Wed, 11 Feb 2026 05:26:10 +0100 Subject: [PATCH 2/3] wording with ai --- docs/docs/20-usage/60-services.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/20-usage/60-services.md b/docs/docs/20-usage/60-services.md index ab2ac366364..e8f5a04f9a7 100644 --- a/docs/docs/20-usage/60-services.md +++ b/docs/docs/20-usage/60-services.md @@ -39,8 +39,8 @@ services: ## Stopping -Services once not needed anymore get **SIGTERM** signal. If they don't honor it they will just get killed via **SIGKILL**. -If you have services that don't gracefully stop and it does not matter, just ignore the failure: +Services that are no longer needed receive a **SIGTERM** signal. If they don't respond to it, they will be forcibly terminated with **SIGKILL**. +If you have services that don't shut down gracefully and it doesn't matter, you can simply ignore the failure: ```diff services: From 0b8d32263f98f517063de0e5077ca6923b99e481 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 11 Feb 2026 20:52:25 +0100 Subject: [PATCH 3/3] Update docs/docs/20-usage/60-services.md Co-authored-by: Robert Kaussow --- docs/docs/20-usage/60-services.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/20-usage/60-services.md b/docs/docs/20-usage/60-services.md index e8f5a04f9a7..fa243f70fd1 100644 --- a/docs/docs/20-usage/60-services.md +++ b/docs/docs/20-usage/60-services.md @@ -39,8 +39,8 @@ services: ## Stopping -Services that are no longer needed receive a **SIGTERM** signal. If they don't respond to it, they will be forcibly terminated with **SIGKILL**. -If you have services that don't shut down gracefully and it doesn't matter, you can simply ignore the failure: +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: