mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-05 10:20:36 +02:00
parent
8e8f8967c3
commit
4f015edc05
@ -4,6 +4,20 @@ Woodpecker supports defining conditional pipeline steps in the `when` block. If
|
|||||||
|
|
||||||
This can also be utilised on a playbook level if you have multi-arch agents and require specific pipelines to be run on specific architectures. See [platform](#platform) below.
|
This can also be utilised on a playbook level if you have multi-arch agents and require specific pipelines to be run on specific architectures. See [platform](#platform) below.
|
||||||
|
|
||||||
|
## `repo`
|
||||||
|
|
||||||
|
Example conditional execution by repository:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
pipeline:
|
||||||
|
slack:
|
||||||
|
image: plugins/slack
|
||||||
|
settings:
|
||||||
|
channel: dev
|
||||||
|
+ when:
|
||||||
|
+ repo: test/test
|
||||||
|
```
|
||||||
|
|
||||||
## `branch`
|
## `branch`
|
||||||
|
|
||||||
Example conditional execution by branch:
|
Example conditional execution by branch:
|
||||||
|
@ -88,3 +88,10 @@ pipeline:
|
|||||||
include: [ '.woodpecker/*.yml', '*.ini' ]
|
include: [ '.woodpecker/*.yml', '*.ini' ]
|
||||||
exclude: [ '*.md', 'docs/**' ]
|
exclude: [ '*.md', 'docs/**' ]
|
||||||
ignore_message: "[ALL]"
|
ignore_message: "[ALL]"
|
||||||
|
|
||||||
|
when-repo:
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- echo "test"
|
||||||
|
when:
|
||||||
|
repo: test/test
|
||||||
|
@ -185,6 +185,19 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"repo": {
|
||||||
|
"description": "Execute a step only on a specific repository. Read more: https://woodpecker-ci.org/docs/usage/conditional-execution#repo",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
{ "type": "string" }
|
||||||
|
]
|
||||||
|
},
|
||||||
"branch": {
|
"branch": {
|
||||||
"description": "TODO Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#branch",
|
"description": "TODO Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#branch",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
Loading…
Reference in New Issue
Block a user