Sign inSign up

fourdollars/rclone-resource

By fourdollars

Updated 6 months ago

Concourse CI resource type for rclone

Image
0

2.7K

fourdollars/rclone-resource repository overview

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

rclone-resource

rclone's resource

Config

Resource Type
resource_types:
- name: resource-rclone
  type: registry-image
  source:
    repository: fourdollars/rclone-resource
    tag: latest

or

resource_types:
- name: resource-rclone
  type: registry-image
  source:
    repository: ghcr.io/fourdollars/rclone-resource
    tag: latest
Resource
  • remote: required
  • config: required
  • path: optional, if not specified, it will watch the root folder.
  • files: optional, if not specified, it will watch the whole folder.
  • args: optional, the arguments list passed to rclone copy.
resources:
- name: storage
  type: resource-rclone
  source:
    remote: webdavRemote
    config: |
      [webdavRemote]
      type = webdav
      url = https://webdav.some.where/share/project/
      vendor = other
      user = hello-kitty
      pass = e3b0c44298fc1-149afbf4c8996fb92427ae41
    path: First/Path
check step

It will use rclone lsjson to watch the changes.

# It acts like the following command.
$ rclone lsjson webdavRemote:First/Path
get step
  • path: optional
  • files: optional, if specified, it will overwrite the files in source.
  • skip: optional, set true if you just want to list files and folders.
  • args: optional, the arguments list passed to rclone copy.
- get: storage
  params:
    folder: Second/Folder
    files:
      - file1.txt
      - file2.txt
# It acts like the following commands.
$ cd /tmp/build/get
$ rclone copy webdavRemote:First/Path/Second/Folder/file1.txt .
$ rclone copy webdavRemote:First/Path/Second/Folder/file2.txt .
put step
  • from: required
  • files: optional, if not specified, it will copy all files under 'from'.
  • folder: optional
  • args: optional, the arguments list passed to rclone copy.
  • get_params:
    • 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:
    args:
      - --ignore-times
    from: SomeFolderInTask
    files:
      - file1.txt
      - file2.txt
    folder: Second/Folder
  get_params:
    skip: true
# It acts like the following commands.
$ cd /tmp/build/put
$ rclone copy --ignore-times SomeFolderInTask/file1.txt webdavRemote:First/Path/Second/Folder
$ rclone copy --ignore-times SomeFolderInTask/file2.txt webdavRemote:First/Path/Second/Folder

Tag summary

Content type

Image

Digest

sha256:897914fee

Size

33.7 MB

Last updated

6 months ago

docker pull fourdollars/rclone-resource