From 6ce3006a72d613739940955a4ffc8a584b54159b Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 19 Dec 2019 13:18:05 +0100 Subject: [PATCH] samba: Collection of small improvements (#913) * samba: Move data files into data folder * samba: Prettier YAML & JSON files * samba: Update add-on URL * samba: Remove curl from Dockerfile, already in the base image --- samba/Dockerfile | 5 ++--- samba/azure-pipelines.yml | 15 +++++++-------- samba/config.json | 40 +++++++-------------------------------- samba/{ => data}/run.sh | 0 samba/{ => data}/smb.conf | 0 5 files changed, 16 insertions(+), 44 deletions(-) rename samba/{ => data}/run.sh (100%) rename samba/{ => data}/smb.conf (100%) diff --git a/samba/Dockerfile b/samba/Dockerfile index 268b60b..520e97d 100644 --- a/samba/Dockerfile +++ b/samba/Dockerfile @@ -6,12 +6,11 @@ ENV LANG C.UTF-8 # Setup base RUN apk add --no-cache \ - curl \ samba-common-tools \ samba-server # Copy data -COPY run.sh / -COPY smb.conf /etc/ +COPY data/run.sh / +COPY data/smb.conf /etc/ CMD [ "/run.sh" ] diff --git a/samba/azure-pipelines.yml b/samba/azure-pipelines.yml index 94c79b2..ecc7317 100644 --- a/samba/azure-pipelines.yml +++ b/samba/azure-pipelines.yml @@ -3,20 +3,19 @@ trigger: branches: include: - - master + - master paths: include: - - samba/* + - samba/* pr: none variables: - name: versionBuilder - value: '2.0' + value: "2.0" - group: docker - jobs: -- template: /.azure/azp-template-addon.yml - parameters: - addon: 'samba' - arch: '--all' + - template: /.azure/azp-template-addon.yml + parameters: + addon: "samba" + arch: "--all" diff --git a/samba/config.json b/samba/config.json index d37e6f5..24be12c 100644 --- a/samba/config.json +++ b/samba/config.json @@ -3,53 +3,27 @@ "version": "9.0", "slug": "samba", "description": "Expose Hass.io folders with SMB/CIFS", - "url": "https://home-assistant.io/addons/samba/", - "arch": [ - "armhf", - "armv7", - "aarch64", - "amd64", - "i386" - ], + "url": "https://github.com/home-assistant/hassio-addons/tree/master/samba", + "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], "startup": "services", "boot": "auto", "host_network": true, - "map": [ - "config:rw", - "ssl:rw", - "addons:rw", - "share:rw", - "backup:rw" - ], + "map": ["config:rw", "ssl:rw", "addons:rw", "share:rw", "backup:rw"], "options": { "workgroup": "WORKGROUP", "username": "hassio", "password": null, "interface": "", - "allow_hosts": [ - "10.0.0.0/8", - "172.16.0.0/12", - "192.168.0.0/16" - ], - "veto_files": [ - "._*", - ".DS_Store", - "Thumbs.db", - "icon?", - ".Trashes" - ] + "allow_hosts": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"], + "veto_files": ["._*", ".DS_Store", "Thumbs.db", "icon?", ".Trashes"] }, "schema": { "workgroup": "str", "username": "str", "password": "str", "interface": "str", - "allow_hosts": [ - "str" - ], - "veto_files": [ - "str" - ] + "allow_hosts": ["str"], + "veto_files": ["str"] }, "image": "homeassistant/{arch}-addon-samba" } diff --git a/samba/run.sh b/samba/data/run.sh similarity index 100% rename from samba/run.sh rename to samba/data/run.sh diff --git a/samba/smb.conf b/samba/data/smb.conf similarity index 100% rename from samba/smb.conf rename to samba/data/smb.conf