mirror of
https://github.com/ViViDboarder/drone-webdav.git
synced 2025-01-04 19:47:33 +00:00
Update readme & Add docs.md (#16)
* docs: use "from_secret" - https://docs.drone.io/secret/repository/ - https://woodpecker-ci.org/docs/usage/secrets * Update Readme.md * Add docs.md to add it to the WoodpeckerCI-Plugin index https://woodpecker-ci.org/plugins
This commit is contained in:
parent
5f3f05247a
commit
d9d0424b9f
24
Readme.md
24
Readme.md
@ -1,5 +1,6 @@
|
||||
# drone-webdav
|
||||
A WebDAV plugin, for the drone.io project, which allows you to push build artifacts to any WebDAV server, including Nextcloud or ownCloud.
|
||||
|
||||
A [Drone CI](https://www.drone.io/) / [Woodpecker CI](https://woodpecker-ci.org/) plugin, that will allow pushing build artifacts to any WebDAV server, including Nextcloud or ownCloud.
|
||||
|
||||
## Examples
|
||||
|
||||
@ -25,18 +26,18 @@ pipeline:
|
||||
settings:
|
||||
file: com.vividboarder.otbeta/build/outputs/apk/com.vividboarder.otbeta-debug.apk
|
||||
destination: https://my.nextcloud.com/remote.php/dav/files/vividboarder/Android/Apks/
|
||||
secrets:
|
||||
- source: WEBDAV_USER
|
||||
target: PLUGIN_USERNAME
|
||||
- source: WEBDAV_PASSWORD
|
||||
target: PLUGIN_PASSWORD
|
||||
user:
|
||||
from_secret: WEBDAV_USER
|
||||
password:
|
||||
from_secret: WEBDAV_PASSWORD
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
#### How do I upload multiple files at once?
|
||||
Since this script uses **curl** to upload your files, you can use it's corresponding syntax.<br>
|
||||
An example, taken from the official [documentation](https://curl.haxx.se/docs/manpage.html#-T), would be to pass ``{dogs.png,cats.jpg}`` to ``PLUGIN_FILE``.
|
||||
### How do I upload multiple files at once?
|
||||
|
||||
Since this script uses **curl** to upload your files, you can use it's corresponding syntax.
|
||||
An example, taken from the official [documentation](https://curl.se/docs/manpage.html#-T), would be to pass ``{dogs.png,cats.jpg}`` to ``PLUGIN_FILE``.
|
||||
|
||||
## Customization
|
||||
|
||||
@ -49,11 +50,12 @@ The following environment variables can be used for further cutomization:
|
||||
| ``PLUGIN_ATTEMPTS`` | Defines how often a failed upload should be retried. Normally there is only one upload attempt. |
|
||||
| ``PLUGIN_CUSTOM_ARGUMENTS`` | Additional arguments to be passed to `curl`. |
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
There are only two tests right now and they are configured using Docker Compose. To run them, just use
|
||||
|
||||
make test
|
||||
```sh
|
||||
make test
|
||||
```
|
||||
|
||||
If someone wants to make this better (or add a Drone file) I'd gladly accept the patch.
|
||||
|
47
docs.md
Normal file
47
docs.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
name: WebDAV
|
||||
|
||||
description: plugin to publish any artifacts to any WebDAV server
|
||||
authors: vividboarder
|
||||
tags: [deploy, publish]
|
||||
containerImage: vividboarder/drone-webdav
|
||||
containerImageUrl: https://hub.docker.com/r/vividboarder/drone-webdav
|
||||
url: https://github.com/vividboarder/drone-webdav
|
||||
---
|
||||
|
||||
A [Drone CI](https://www.drone.io/) / [Woodpecker CI](https://woodpecker-ci.org/) plugin,
|
||||
that will allow pushing build artifacts to any [WebDAV](http://www.webdav.org/) server, including Nextcloud or ownCloud.
|
||||
|
||||
## Features
|
||||
|
||||
- Upload multiple files
|
||||
- Use a proxy
|
||||
- Retry on fail
|
||||
|
||||
## Settings
|
||||
|
||||
| Settings Name | Required | Description
|
||||
| ------------------ |--------- | --------------------------------------------
|
||||
| `file` | **✓** | File(s) to upload. Use [curl syntax](https://curl.se/docs/manpage.html#-T) for multiple (e.g. `{dogs.png,cats.jpg}`)
|
||||
| `destination` | **✓** | The WebDav **folder** url
|
||||
| `user` | **✓** | The WebDav-**User** to use
|
||||
| `password` | | The **Password** for the WebDav-User
|
||||
| `proxy_url` | | May be used to specify a proxy (e.g. `socks5://{ip_address}:{port}`
|
||||
| `timeout` | | Defines a timeout (in seconds) to stop the upload after a certain time
|
||||
| `attempts` | | Defines how often a failed upload should be retried. Normally there is only one upload attempt
|
||||
| `custom_arguments` | | Additional arguments to be passed to [`curl`](https://curl.se/)
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
pipeline:
|
||||
upload_debug:
|
||||
image: vividboarder/drone-webdav
|
||||
settings:
|
||||
file: com.vividboarder.otbeta/build/outputs/apk/com.vividboarder.otbeta-debug.apk
|
||||
destination: https://my.nextcloud.com/remote.php/dav/files/vividboarder/Android/Apks/
|
||||
user:
|
||||
from_secret: WEBDAV_USER
|
||||
password:
|
||||
from_secret: WEBDAV_PASSWORD
|
||||
```
|
Loading…
Reference in New Issue
Block a user