From 39dfe13dfeb0d6ff15f082ae0dbc5959f56a3d1e Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Sun, 12 Sep 2021 20:33:28 +0200 Subject: [PATCH] drone deploy ot-recorder --- .drone.yml | 28 ++++++++++++++++++++++++++++ ot-recorder/Dockerfile | 16 ++++++++-------- ot-recorder/config.json | 3 ++- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9ec17d0..dda26ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,3 +23,31 @@ trigger: event: - tag - push + +--- + +kind: pipeline +type: docker +name: default + +steps: + + - name: build_and_publish_ot-recorder + image: plugins/docker:linux-amd64 + settings: + dockerfile: ot-recorder/Dockerfile + context: ot-recorder + password: + from_secret: docker_password + registry: docker.asperti.com + repo: docker.asperti.com/paspo/hassio-ot-recorder + tags: + - latest + - 0.2.2 + username: + from_secret: docker_username + +trigger: + event: + - tag + - push \ No newline at end of file diff --git a/ot-recorder/Dockerfile b/ot-recorder/Dockerfile index 3633991..465ea4c 100644 --- a/ot-recorder/Dockerfile +++ b/ot-recorder/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM +ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.2 FROM $BUILD_FROM AS builder ENV LANG C.UTF-8 @@ -6,15 +6,15 @@ ENV LANG C.UTF-8 RUN apk add --no-cache \ abuild linux-headers musl-dev mosquitto-dev \ lmdb-dev curl-dev libconfig-dev gcc make libsodium-dev && \ - wget -q https://github.com/owntracks/recorder/archive/0.8.4.tar.gz -O - | tar xvzC /tmp + wget -q https://github.com/owntracks/recorder/archive/0.8.7.tar.gz -O - | tar xvzC /tmp -COPY config.mk /tmp/recorder-0.8.4/ +COPY config.mk /tmp/recorder-0.8.7/ -RUN cd /tmp/recorder-0.8.4/ && \ +RUN cd /tmp/recorder-0.8.7/ && \ make -ARG BUILD_FROM +ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.2 FROM $BUILD_FROM ENV LANG C.UTF-8 @@ -25,9 +25,9 @@ RUN apk -U --no-cache upgrade && \ EXPOSE 8083 -COPY --from=builder /tmp/recorder-0.8.4/ocat /usr/sbin/ -COPY --from=builder /tmp/recorder-0.8.4/ot-recorder /usr/sbin/ -COPY --from=builder /tmp/recorder-0.8.4/docroot /var/spool/owntracks/recorder/htdocs +COPY --from=builder /tmp/recorder-0.8.7/ocat /usr/sbin/ +COPY --from=builder /tmp/recorder-0.8.7/ot-recorder /usr/sbin/ +COPY --from=builder /tmp/recorder-0.8.7/docroot /var/spool/owntracks/recorder/htdocs COPY run.sh / RUN chmod a+x /run.sh diff --git a/ot-recorder/config.json b/ot-recorder/config.json index 6bf761b..8b7f687 100644 --- a/ot-recorder/config.json +++ b/ot-recorder/config.json @@ -1,7 +1,8 @@ { "name": "Owntracks Recorder", "url": "https://git.asperti.com/paspo/hassio-addons", - "version": "0.2.1", + "image": "docker.asperti.com/paspo/hassio-ot-recorder", + "version": "0.2.2", "slug": "ot-recorder", "description": "Owntracks Recorder - connects to your mqtt broker and consumes owntracks locations", "startup": "before",