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.

93 lines
2.4 KiB

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. The rclone destination for the files. ex. `remote:some/location`
  45. * `subdir`: Optional. A file that includes additional path information to be appended to the end of destination.
  46. #### Example
  47. ```bash
  48. # Extends example in Source Configuration
  49. jobs:
  50. - name:
  51. plan:
  52. - do:
  53. - get: code # git resource
  54. - put: rclone
  55. params:
  56. source: code
  57. destination: "remote:backup"
  58. subdir: code/target
  59. ```
  60. ## License
  61. Copyright 2020 Drew Short
  62. Licensed under the Apache License, Version 2.0 (the "License");
  63. you may not use this file except in compliance with the License.
  64. You may obtain a copy of the License at
  65. http://www.apache.org/licenses/LICENSE-2.0
  66. Unless required by applicable law or agreed to in writing, software
  67. distributed under the License is distributed on an "AS IS" BASIS,
  68. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  69. See the License for the specific language governing permissions and
  70. limitations under the License.