mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-09-01 16:48:31 +00:00
Merge branch 'dev'
This commit is contained in:
+22
-4
@@ -9,13 +9,31 @@ build_and_push() {
|
||||
docker push $DOCKER_USERNAME/zigbee2mqtt:$1
|
||||
}
|
||||
|
||||
push_hassio_addon() {
|
||||
docker tag $DOCKER_USERNAME/zigbee2mqtt:$1 $DOCKER_USERNAME/zigbee2mqtt-hassioaddon-$2
|
||||
docker push $DOCKER_USERNAME/zigbee2mqtt-hassioaddon-$2
|
||||
}
|
||||
|
||||
# Only update docker images if on master branch and not pull request
|
||||
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]
|
||||
then
|
||||
echo "Updating docker images!"
|
||||
echo "Updating docker images for master branch!"
|
||||
login
|
||||
build_and_push latest docker/Dockerfile
|
||||
build_and_push armv7hf docker/Dockerfile.armv7hf
|
||||
build_and_push latest docker/Dockerfile.amd64
|
||||
build_and_push arm32v6 docker/Dockerfile.arm32v6
|
||||
build_and_push arm64v8 docker/Dockerfile.arm64v8
|
||||
|
||||
echo "Pushing hass.io addon images"
|
||||
push_hassio_addon latest amd64
|
||||
push_hassio_addon arm32v6 armhf
|
||||
push_hassio_addon arm64v8 aarch64
|
||||
elif [ "$TRAVIS_BRANCH" = "dev" -a "$TRAVIS_PULL_REQUEST" = "false" ]
|
||||
then
|
||||
echo "Updating docker images for dev branch!"
|
||||
login
|
||||
build_and_push latest-dev docker/Dockerfile.amd64
|
||||
build_and_push arm32v6-dev docker/Dockerfile.arm32v6
|
||||
build_and_push arm64v8-dev docker/Dockerfile.arm64v8
|
||||
else
|
||||
echo "Not updating docker images, triggered by pull request or not on master branch"
|
||||
echo "Not updating docker images, triggered by pull request or not on master/dev branch"
|
||||
fi
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM node:8
|
||||
|
||||
# Copy files
|
||||
ADD . /app
|
||||
RUN cp /app/data/configuration.yaml /app
|
||||
RUN cp /app/docker/start.sh /app
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["./start.sh"]
|
||||
@@ -0,0 +1,16 @@
|
||||
FROM alpine:3.7
|
||||
|
||||
# Copy files
|
||||
ADD . /app
|
||||
RUN cp /app/data/configuration.yaml /app
|
||||
RUN cp /app/docker/run.sh /app
|
||||
RUN chmod +x /app/run.sh
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --update --no-cache make gcc g++ python linux-headers udev nodejs git && \
|
||||
npm install --unsafe-perm && \
|
||||
apk del make gcc g++ python linux-headers udev git
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["./run.sh"]
|
||||
@@ -0,0 +1,18 @@
|
||||
FROM arm32v6/alpine:3.7
|
||||
|
||||
# Setup cross-build
|
||||
ENV QEMU_EXECVE 1
|
||||
COPY docker/qemu-arm-static /usr/bin
|
||||
WORKDIR /app
|
||||
|
||||
# Copy files & install dependencies
|
||||
ADD . /app
|
||||
RUN [ "qemu-arm-static", "/bin/sh", "-c", \
|
||||
"cp /app/data/configuration.yaml /app && \
|
||||
cp /app/docker/run.sh /app && chmod +x /app/run.sh && \
|
||||
apk add --update --no-cache make gcc g++ python linux-headers udev nodejs git && \
|
||||
npm install --unsafe-perm && \
|
||||
apk del make gcc g++ python linux-headers udev git"]
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["./run.sh"]
|
||||
@@ -0,0 +1,18 @@
|
||||
FROM arm64v8/alpine:3.7
|
||||
|
||||
# Setup cross-build
|
||||
ENV QEMU_EXECVE 1
|
||||
COPY docker/qemu-aarch64-static /usr/bin
|
||||
WORKDIR /app
|
||||
|
||||
# Copy files & install dependencies
|
||||
ADD . /app
|
||||
RUN [ "qemu-aarch64-static", "/bin/sh", "-c", \
|
||||
"cp /app/data/configuration.yaml /app && \
|
||||
cp /app/docker/run.sh /app && chmod +x /app/run.sh && \
|
||||
apk add --update --no-cache make gcc g++ python linux-headers udev nodejs git && \
|
||||
npm install --unsafe-perm && \
|
||||
apk del make gcc g++ python linux-headers udev git"]
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["./run.sh"]
|
||||
@@ -1,24 +0,0 @@
|
||||
FROM resin/armv7hf-debian
|
||||
|
||||
RUN [ "cross-build-start" ]
|
||||
|
||||
# Install nodejs and git
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
|
||||
RUN apt-get update && apt-get install -y git nodejs make g++ && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy files
|
||||
ADD . /app
|
||||
RUN cp /app/data/configuration.yaml /app
|
||||
RUN cp /app/docker/start.sh /app
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
|
||||
# Cleanup
|
||||
RUN apt-get purge g++ make && apt-get autoremove && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN [ "cross-build-end" ]
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["./start.sh"]
|
||||
@@ -0,0 +1 @@
|
||||
qemu-aarch64-static and qemu-arm-static are taken from https://github.com/resin-io/qemu/releases/tag/v2.9.0%2Bresin1
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -f /app/data/configuration.yaml ]; then
|
||||
echo "Creating configuration file..."
|
||||
cp /app/configuration.yaml /app/data/configuration.yaml
|
||||
fi
|
||||
|
||||
npm start
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp -n /app/configuration.yaml /app/data/configuration.yaml
|
||||
npm start
|
||||
Reference in New Issue
Block a user