aequitas / concourse-ftp-resource

Concourse resource to interact with FTP servers.
https://hub.docker.com/r/aequitas/ftp-resource/
MIT License
3 stars 6 forks source link

Docker Automated build Docker Automated build Docker Automated build Cyberveiligheid

FTP Resource

Concourse resource to interact with FTP servers.

https://hub.docker.com/r/aequitas/ftp-resource/

Recent changes

Deploying to Concourse

No changes are necessary to BOSH configuration. However, you must define the FTP resource in a resource_types as can be seen in the below example pipeline.

Source Configuration

Behavior

check: Return list of file versions.

Will request a list of files from the uri and filter on matching regex extracting the version_key and returning list of versions captured groups.

in: Retrieve file matching version from ftp.

Uses the regex to compose a list of files and versions, will return the one file that matches the version provided in params.

Parameters

out: Upload file(s) matching file glob to ftp.

Uploads a file(s) glob matching file to the ftp directory specified by uri.

Parameters

Example pipeline

resource_types:
  - name: ftp
    type: docker-image
    source:
      repository: aequitas/ftp-resource

resources:
  - name: ftpupload
    type: ftp
    source:
      regex: (?P<file>test(?P<version>[0-9\.]+).*\.txt)
      uri: ftp://user:password@example.com:21/team/prod/

jobs:
  - name: testftp
    plan:
      - task: touchfile
        config:
          platform: linux
          run:
            path: sh
            args:
            - -exc
            - |
              touch test/test1.txt
          outputs:
          - name: test
      - put: ftpupload
        params:
          file: test/test1.txt