You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.9 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # concourse-rclone-resource
  2. A Concourse CI resource that executes [`rclone`](https://rclone.org/)
  3. against a remote host.
  4. See [Docker Hub](https://cloud.docker.com/repository/docker/warricksothr/concourse-rclone-resource)
  5. for tagged image versions available.
  6. ## Resource Type Configuration
  7. ```bash
  8. resource_types:
  9. - name: rclone
  10. type: docker-image
  11. source:
  12. repository: warricksothr/concourse-rclone-resource
  13. tag: latest
  14. files:
  15. serviceAccountFile: |
  16. ...contents...
  17. ```
  18. ## Source Configuration
  19. * `config`: Required. The rclone config file contents to use.
  20. * `password`: Optional. Encryption password used for encrypted rclone configurations. Please use secrets management for this value.
  21. * `files`: Optional. Additional files to write to the /tmp/rclone directory. This is a map of key/value pairs for the filename and contents of that file.
  22. ### Example
  23. ```bash
  24. resources:
  25. - name: rclone
  26. type: rclone
  27. source:
  28. config: |
  29. [remote]
  30. client_id = <Your ID>
  31. client_secret = <Your Secret>
  32. scope = drive
  33. root_folder_id = <Your root folder id>
  34. service_account_file = /tmp/rclone/serviceAccountFile
  35. token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2014-03-16T13:57:58.955387075Z"}
  36. ```
  37. ### Note
  38. It's highly recommended to use secrets mangement to avoid storing sensitive credentials in the pipeline
  39. ## Behaviour
  40. ### `check`: No-Op
  41. ### `in`: No-Op
  42. ### `out`: Execute `rclone`
  43. #### Parameters
  44. * `source`: Required. The path to the source files.
  45. * `destination`: Required. A list of destinations to copy files to.
  46. * `dir`: Required. A rclone destination for the files. ex. `remote:some/location`
  47. * `subdir`: Optional. A file that includes additional path information to be appended to the end of destination.
  48. * `dedupe`: Optional. Run `rsync dedupe` after syncing files. Default false
  49. * `dedupeMode`: Optional. The dedupe mode to use. Default newest. [rclone dedupe](https://rclone.org/commands/rclone_dedupe/)
  50. * skip
  51. * first
  52. * newest (default)
  53. * oldest
  54. * largest
  55. * rename
  56. #### Example
  57. ```bash
  58. # Extends example in Source Configuration
  59. jobs:
  60. - name:
  61. plan:
  62. - do:
  63. - get: code # git resource
  64. - put: rclone
  65. params:
  66. source: code
  67. destination:
  68. - dir: "remote:backup"
  69. subdir: code/target
  70. - dir: "remote2:release"
  71. ```
  72. ## License
  73. Copyright 2020 Drew Short
  74. Licensed under the Apache License, Version 2.0 (the "License");
  75. you may not use this file except in compliance with the License.
  76. You may obtain a copy of the License at
  77. http://www.apache.org/licenses/LICENSE-2.0
  78. Unless required by applicable law or agreed to in writing, software
  79. distributed under the License is distributed on an "AS IS" BASIS,
  80. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  81. See the License for the specific language governing permissions and
  82. limitations under the License.