https://github.com/fourdollars/samba-resource
concourse-ci's samba-resource
https://github.com/fourdollars/samba-resource
concourse-ci-resource samba
Last synced: 27 days ago
JSON representation
concourse-ci's samba-resource
- Host: GitHub
- URL: https://github.com/fourdollars/samba-resource
- Owner: fourdollars
- License: mit
- Created: 2020-12-28T12:57:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T02:57:27.000Z (9 months ago)
- Last Synced: 2025-02-12T18:43:25.880Z (3 months ago)
- Topics: concourse-ci-resource, samba
- Language: Shell
- Homepage: https://fourdollars.github.io/
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/fourdollars/samba-resource/) [](https://opensource.org/licenses/MIT) [](https://www.gnu.org/software/bash/)  [](https://hub.docker.com/r/fourdollars/samba-resource/)
# samba-resource
[concourse-ci](https://concourse-ci.org/)'s samba-resource* Inspired by [airtonix/concourse-resource-samba](https://github.com/airtonix/concourse-resource-samba) and [JeffDeCola/resource-template](https://github.com/JeffDeCola/resource-template)
## Config
### Resource Type
```yaml
resource_types:
- name: resource-samba
type: registry-image
source:
repository: fourdollars/samba-resource
tag: latest
```or
```yaml
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.```yaml
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.```yaml
- get: storage
params:
path: SecondaryFolder
files:
- file1.txt
- file2.txt
skip: false
```
```shell
# 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](https://concourse-ci.org/jobs.html#put-step) after the put step to download the same content again in order to save the execution time.```yaml
- put: storage
params:
from: SomeFolderInTask
files:
- file1.txt
- file2.txt
overwrite: false
path: SecondaryDirectory
get_params:
skip: true
```
```shell
# 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
```