From ed3f09a481152aaca8450c95137be896719e6ae0 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 18 Dec 2019 13:54:07 +0100 Subject: [PATCH] git_pull: Collection of improvements (#901) * git_pull: Prettier YAML files * git_pull: Move run.sh to data folder * git_pull: Update add-on URL * git_pull: Pin add-on base images * git_pull: Documentation tweak * git_pull: Remove installation of curl, part of base image * git_pull: Styling tweak to Dockerfile --- git_pull/Dockerfile | 6 +++--- git_pull/README.md | 11 ++++++----- git_pull/azure-pipelines.yml | 15 +++++++-------- git_pull/build.json | 7 +++++++ git_pull/config.json | 2 +- git_pull/{ => data}/run.sh | 0 6 files changed, 24 insertions(+), 17 deletions(-) rename git_pull/{ => data}/run.sh (100%) diff --git a/git_pull/Dockerfile b/git_pull/Dockerfile index 8298391..2376d87 100644 --- a/git_pull/Dockerfile +++ b/git_pull/Dockerfile @@ -7,11 +7,11 @@ RUN apk add --no-cache jq curl git openssh-client # Hass.io CLI ARG BUILD_ARCH ARG CLI_VERSION -RUN apk add --no-cache curl \ - && curl -Lso /usr/bin/hassio https://github.com/home-assistant/hassio-cli/releases/download/${CLI_VERSION}/hassio_${BUILD_ARCH} \ +RUN curl -Lso /usr/bin/hassio \ + "https://github.com/home-assistant/hassio-cli/releases/download/${CLI_VERSION}/hassio_${BUILD_ARCH}" \ && chmod a+x /usr/bin/hassio # Copy data -COPY run.sh / +COPY data/run.sh / CMD [ "/run.sh" ] diff --git a/git_pull/README.md b/git_pull/README.md index 38aa5de..be7f97f 100644 --- a/git_pull/README.md +++ b/git_pull/README.md @@ -11,7 +11,7 @@ repository. ## Installation -The installation of this add-on is straightforward and easy to do. +Follow these steps to get the add-on installed on your system: 1. Navigate in your Home Assistant frontend to **Hass.io** -> **Add-on Store**. 2. Find the "Git pull" add-on and click it. @@ -135,10 +135,11 @@ A private SSH key that will be used for communication during Git operations. Thi ### Option: `deployment_key_protocol` (optional) The key protocol. Default is `rsa`. Valid protocols are: - - dsa - - ecdsa - - ed25519 - - rsa + +- dsa +- ecdsa +- ed25519 +- rsa The protocol is typically known by the suffix of the private key --e.g., a key file named `id_rsa` will be a private key using `rsa` protocol. diff --git a/git_pull/azure-pipelines.yml b/git_pull/azure-pipelines.yml index 0567209..acb410c 100644 --- a/git_pull/azure-pipelines.yml +++ b/git_pull/azure-pipelines.yml @@ -3,20 +3,19 @@ trigger: branches: include: - - master + - master paths: include: - - git_pull/* + - git_pull/* pr: none variables: - name: versionBuilder - value: '2.0' + value: "2.0" - group: docker - jobs: -- template: /.azure/azp-template-addon.yml - parameters: - addon: 'git_pull' - arch: '--all' + - template: /.azure/azp-template-addon.yml + parameters: + addon: "git_pull" + arch: "--all" diff --git a/git_pull/build.json b/git_pull/build.json index d5d36d0..e6b706b 100644 --- a/git_pull/build.json +++ b/git_pull/build.json @@ -1,4 +1,11 @@ { + "build_from": { + "aarch64": "homeassistant/aarch64-base:3.10", + "amd64": "homeassistant/amd64-base:3.10", + "armhf": "homeassistant/armhf-base:3.10", + "armv7": "homeassistant/armv7-base:3.10", + "i386": "homeassistant/i386-base:3.10" + }, "args": { "CLI_VERSION": "3.1.1" } diff --git a/git_pull/config.json b/git_pull/config.json index 4fdf95f..035c612 100644 --- a/git_pull/config.json +++ b/git_pull/config.json @@ -3,7 +3,7 @@ "version": "7.7", "slug": "git_pull", "description": "Simple git pull to update the local configuration", - "url": "https://home-assistant.io/addons/git_pull/", + "url": "https://github.com/home-assistant/hassio-addons/tree/master/git_pull", "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], "startup": "services", "boot": "manual", diff --git a/git_pull/run.sh b/git_pull/data/run.sh similarity index 100% rename from git_pull/run.sh rename to git_pull/data/run.sh