Giter Club home page Giter Club logo

concourse-smb-share's Introduction

concourse-smb-share

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.

Config

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:

  1. //
  2. server name or ip address
  3. share name
  4. 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

Tests

Just execute:

$ npm test

License

The MIT License (MIT)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.