Skip to content

fourdollars/webdav-resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub: fourdollars/webdav-resource License: MIT Bash Docker Docker Pulls

webdav-resource

concourse-ci's webdav-resource

It only supports to get/put files under single folder.

Config

Resource Type

resource_types:
- name: resource-webdav
  type: registry-image
  source:
    repository: fourdollars/webdav-resource
    tag: latest

or

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.
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.
- get: storage
  params:
    path: SecondaryFolder
    files:
      - file1.txt
      - file2.txt
    skip: false
# 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 after the put step to download the same content again in order to save the execution time.
- put: storage
  params:
    from: SomeFolderInTask
    files:
      - file1.txt
      - file2.txt
    overwrite: false
    path: SecondaryDirectory
  get_params:
    skip: true
# 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