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.

49 lines
2.0 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. # File URL Resource
  2. Downloads and tracks the update of a single URL-addressable file.
  3. This is a useful resource for pipeline development time, while a required artifact is temporarily available from a URL-addressable location, until it is moved to a more robust file management repository such as [git](https://github.com/concourse/git-resource) or [S3](https://github.com/concourse/s3-resource).
  4. ## Source Configuration
  5. * `url`: *Required.* The url location of the file. It has to be publicly available, no user authentication supported in v0.0.1.
  6. * `filename`: *Optional.* The name of the file for the downloaded artifact to be save as. If not provided, the file will be saved using the full url string as its name.
  7. * `skip_ssl_verification`: *Optional.* Skips ssl verification if defined as `true`. Default is `false`.
  8. ### Example
  9. Resource configuration:
  10. ``` yaml
  11. resource_types:
  12. - name: file-url
  13. type: docker-image
  14. source:
  15. repository: pivotalservices/concourse-curl-resource
  16. tag: latest
  17. resources:
  18. - name: my-file
  19. type: file-url
  20. source:
  21. url: https://raw.githubusercontent.com/pivotalservices/concourse-curl-resource/master/test/data/pivotal-1.0.0.txt
  22. filename: pivotal-1.0.0.txt
  23. ```
  24. ## Behavior
  25. ### `check`: Check for the latest version of the file.
  26. The resource uses `curl` under-the-covers to post a GET request and retrieve the HTTP header info for the file URL provided.
  27. If field `Last-Modified` is returned as part of the HTTP response header, then the resource will use that to build a version number timestamp with format "YYYYMMDDHHMMSS".
  28. Otherwise, the timestamp string will be built using the request's current time, which will result in a new version being returned every time `check` is executed for that file.
  29. ### `in`: Download the latest version of the file.
  30. Downloads the latest version of the file issuing a `curl` command under-the-covers.
  31. ### `out`: Not supported.
  32. Write actions are not supported by this resource at this moment.