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.

104 lines
2.8 KiB

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