This is concourse.ci resource for retrieving from and persisting build artifacts using a shared (SMB/CIFS) storage location on windows server.
Written in nodejs and internally use smbclient from samba project.
Define concourse resource type:
resource_types:
- name: smb-resource
type: docker-image
source:
repository: vavere/concourse-smb-share
tag: latest
Every defined resource must have a path specified and optional access credentials.
- path: //server/share/dir1/dir2
- user: username (optional)
- pass: password (optional)
A valid path must contain the following parts:
- //
- server name or ip address
- share name
- path inside share: dir1/dir2/... (optional)
For example:
resources:
- name: repo
type: smb-resource
source:
path: //server/share/dir1/dir2
user: ((user))
pass: ((pass))
By default resource get/put all files from/to resource but it's posible limit this action specifying exact file names in pipeline jobs section get or put tasks using params/files array for example:
jobs:
- name: demo
plan:
- get: repo
params:
files:
- file1.txt
- file2.txt
The same is true for sending files in put. Important say that put no touch oher remote files.
It's posible disable implicit get step after pipeline put step setting get_params.skip = true
, with makes sense when dealing with put operations on only few specific file(s) in remote (may be full of files) folder.
Example of putting only few files from result and preventing implicit get:
jobs:
- name: demo
plan:
- put: result
params:
dir: result
files:
- file1.txt
- file2.txt
get_params:
skip: true
You can use files as string with multiple names to, but no spaces un file name are alowwed:
put: repo
params:
files: file1.txt file2.txt
Just execute:
$ npm test
The MIT License (MIT)