Skip to content

fourdollars/samba-resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub: fourdollars/samba-resource License: MIT Bash Docker Docker Pulls

samba-resource

concourse-ci's samba-resource

Config

Resource Type

resource_types:
- name: resource-samba
  type: registry-image
  source:
    repository: fourdollars/samba-resource
    tag: latest

or

resource_types:
- name: resource-samba
  type: registry-image
  source:
    repository: ghcr.io/fourdollars/samba-resource
    tag: latest

Resource

  • servicename: required
  • username: optional
  • password: optional
  • path: optional
  • overwrite: optional, true by default and it can be overriden by params.overwrite of put step below.
resources:
- name: storage
  type: resource-samba
  source:
    servicename: //domain.name.or.ip/share_point
    username: YourUserName
    password: YourPassWord
    path: PrimaryFolder
    overwrite: false

get step

  • path: optional
  • files: optional
  • skip: optional, set true if you just want to list files and folders.
- get: storage
  params:
    path: SecondaryFolder
    files:
      - file1.txt
      - file2.txt
    skip: false
# It acts like the following commands.
$ smbclient //domain.name.or.ip/share_point -U YourUserName YourPassWord -D "PrimaryFolder/SecondaryFolder" -Tc /tmp/backup.tar file1.txt file2.txt
$ cd /tmp
$ tar xf /tmp/backup.tar
$ mv PrimaryFolder/SecondaryFolder/* /tmp/build/get

put step

  • from: required
  • files: optional
  • overwrite: optional
  • path: optional
  • skip: optional if you don't want the implicit get step after the put step to download the same content again in order to save the execution time.
- put: storage
  params:
    from: SomeFolderInTask
    files:
      - file1.txt
      - file2.txt
    overwrite: false
    path: SecondaryDirectory
  get_params:
    skip: true
# It acts like the following commands.
$ cd /tmp/build/put/SomeFolderInTask
$ tar cf /tmp/backup.tar file1.txt file2.txt
$ smbclient //domain.name.or.ip/share_point -U YourUserName YourPassWord -D "PrimaryFolder/SecondaryFolder" -Tx /tmp/backup.tar