https://github.com/fourdollars/webdav-resource
concourse-ci's webdav-resource
https://github.com/fourdollars/webdav-resource
concourse-ci-resource webdav
Last synced: 5 months ago
JSON representation
concourse-ci's webdav-resource
- Host: GitHub
- URL: https://github.com/fourdollars/webdav-resource
- Owner: fourdollars
- License: mit
- Created: 2021-01-02T13:57:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T04:59:07.000Z (9 months ago)
- Last Synced: 2024-08-17T03:47:52.646Z (9 months ago)
- Topics: concourse-ci-resource, webdav
- Language: Shell
- Homepage: https://fourdollars.github.io/
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/fourdollars/webdav-resource/) [](https://opensource.org/licenses/MIT) [](https://www.gnu.org/software/bash/)  [](https://hub.docker.com/r/fourdollars/webdav-resource/)
# webdav-resource
[concourse-ci](https://concourse-ci.org/)'s webdav-resourceIt only supports to get/put files under single folder.
## Config
### Resource Type
```yaml
resource_types:
- name: resource-webdav
type: registry-image
source:
repository: fourdollars/webdav-resource
tag: latest
```or
```yaml
resource_types:
- name: resource-webdav
type: registry-image
source:
repository: ghcr.io/fourdollars/webdav-resource
tag: latest
```### Resource
* domain: **required**
* ssl: true by default
* port: optional
* username: optional
* password: optional
* path: optional
* overwrite: optional, true by default and it can be overriden by params.overwrite of put step below.```yaml
resources:
- name: storage
type: resource-webdav
source:
domain: domain.name.or.ip
ssl: false
port: 8080
username: YourUserName
password: YourPassWord
path: PrimaryFolder
overwrite: false
```### get step
* path: optional
* files: optional
* skip: optional, set true if you just want to list files and folders.```yaml
- get: storage
params:
path: SecondaryFolder
files:
- file1.txt
- file2.txt
skip: false
```
```shell
# It acts like the following commands.
$ cd /tmp/build/get
$ echo "mget file1.txt file2.txt" | cadaver http://domain.name.or.ip:8080/PrimaryFolder/SecondaryFolder
```### put step
* from: **required**
* files: optional
* overwrite: optional
* path: optional
* skip: optional if you don't want the [implicit get step](https://concourse-ci.org/jobs.html#put-step) after the put step to download the same content again in order to save the execution time.```yaml
- put: storage
params:
from: SomeFolderInTask
files:
- file1.txt
- file2.txt
overwrite: false
path: SecondaryDirectory
get_params:
skip: true
```
```shell
# It acts like the following commands.
$ cd /tmp/build/put/SomeFolderInTask
$ echo "ls" | cadaver http://domain.name.or.ip:8080/PrimaryFolder/SecondaryFolder | grep -P file1.txt\|file2.txt || \
echo "mput file1.txt file2.txt" | cadaver http://domain.name.or.ip:8080/PrimaryFolder/SecondaryFolder
```