Update Documentation (fix diffs and add settings) (#569)

* Add migration guide for plugin settings

* Update screenshot snippets

* Adjust plugin settings

* Fix diff insertion

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
6543 2021-12-06 18:18:53 +01:00 committed by GitHub
parent 71b9179078
commit 7fb9191cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 180 additions and 162 deletions

View File

@ -117,12 +117,9 @@ pipeline:
commands:
- go build
- go test
-when:
-platform: [ linux/arm* ]
+when:
+ platform: [ linux/arm* ]
```
Assuming we have two agents, one `arm` and one `amd64`. Previously this pipeline would have executed on **either agent**, as Woodpecker is not fussy about where it runs the pipelines.
@ -134,7 +131,7 @@ This can be utilised in conjunction with other when blocks as well.
Example `when` pipeline & step block:
```yml
```diff
pipeline:
build:
image: golang
@ -144,20 +141,19 @@ pipeline:
publish:
image: plugins/docker
settings:
repo: foo/bar
+ when:
+ tag: release*
+when:
+ platform: [ linux/arm* ]
```
### `platform`
To configure your pipeline to select an agent with a specific platform, you can use `platform` key.
```diff
+platform: linux/arm64
pipeline:
@ -481,6 +477,7 @@ Example configuration to override depth:
clone:
git:
image: woodpeckerci/plugin-git
+ settings:
+ depth: 50
```
@ -498,6 +495,7 @@ Example configuration to clone Mercurial repository:
clone:
hg:
+ image: plugins/hg
+ settings:
+ path: bitbucket.org/foo/bar
```
@ -518,6 +516,7 @@ To use the ssh git url in `.gitmodules` for users cloning with ssh, and also use
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
+ submodule_override:
+ my-module: https://github.com/octocat/my-module.git

View File

@ -12,6 +12,7 @@ Example conditional execution by branch:
pipeline:
slack:
image: plugins/slack
settings:
channel: dev
+ when:
+ branch: master
@ -90,6 +91,7 @@ There are use cases for executing pipeline steps on failure, such as sending not
pipeline:
slack:
image: plugins/slack
settings:
channel: dev
+ when:
+ status: [ success, failure ]

View File

@ -146,6 +146,7 @@ Example commit substitution:
pipeline:
docker:
image: plugins/docker
settings:
+ tags: ${CI_COMMIT_SHA}
```
@ -155,6 +156,7 @@ Example tag substitution:
pipeline:
docker:
image: plugins/docker
settings:
+ tags: ${CI_COMMIT_TAG}
```
@ -182,6 +184,7 @@ Example variable substitution with substring:
pipeline:
docker:
image: plugins/docker
settings:
+ tags: ${CI_COMMIT_SHA:0:8}
```
@ -191,5 +194,6 @@ Example variable substitution strips `v` prefix from `v.1.0.0`:
pipeline:
docker:
image: plugins/docker
settings:
+ tags: ${CI_COMMIT_TAG##v}
```

View File

@ -16,11 +16,13 @@ pipeline:
publish:
image: plugins/docker
settings:
repo: foo/bar
tags: latest
notify:
image: plugins/slack
settings:
channel: dev
```

View File

@ -10,6 +10,7 @@ The below example demonstrates how we might configure a webhook plugin in the Ya
pipeline:
webhook:
image: foo/webhook
settings:
url: http://foo.com
method: post
body: |

View File

@ -1,6 +1,6 @@
# Project settings
As the owner of a project in Woodpecker you can change some project related settings via the Webinterface.
As the owner of a project in Woodpecker you can change project related settings via the web interface.
![project settings](./project-settings.png)
@ -10,7 +10,7 @@ The path to the pipeline config file or folder. By default it is left empty whic
## Repository hooks
Your Version-Control-System will notify Woodpecker about some events via webhooks. If you want your pipeline to only run on specific webhooks, you can check them by this setting.
Your Version-Control-System will notify Woodpecker about events via webhooks. If you want your pipeline to only run on specific webhooks, you can check them with this setting.
## Project settings

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -51,7 +51,17 @@ Some versions need some changes to the server configuration or the pipeline conf
- `/var/lib/drone/drone.sqlite` -> `/var/lib/woodpecker/woodpecker.sqlite`
- `drone.sqlite` -> `woodpecker.sqlite`
- ...
- Plugin Settings moved into `settings` section:
```diff
pipline:
something:
image: my/plugin
- setting1: foo
- setting2: bar
+ settings:
+ setting1: foo
+ setting2: bar
```
## 0.14.0