mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
Switch to Python 3 for docker installs (#774)
This commit is contained in:
parent
28031cfa3e
commit
823ae7d1aa
@ -3,7 +3,7 @@
|
|||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
DOCKER_HOST: tcp://docker:2375/
|
DOCKER_HOST: tcp://docker:2375/
|
||||||
BASE_VERSION: '1.8.3'
|
BASE_VERSION: '2.0.0'
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
@ -33,7 +33,7 @@ stages:
|
|||||||
- docker info
|
- docker info
|
||||||
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
|
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
|
||||||
script:
|
script:
|
||||||
- docker run --rm --privileged hassioaddons/qemu-user-static:latest
|
- docker run --rm --privileged multiarch/qemu-user-static:4.1.0-1 --reset -p yes
|
||||||
- TAG="${CI_COMMIT_TAG#v}"
|
- TAG="${CI_COMMIT_TAG#v}"
|
||||||
- TAG="${TAG:-${CI_COMMIT_SHA:0:7}}"
|
- TAG="${TAG:-${CI_COMMIT_SHA:0:7}}"
|
||||||
- echo "Tag ${TAG}"
|
- echo "Tag ${TAG}"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
ARG BUILD_FROM=esphome/esphome-base-amd64:1.8.3
|
ARG BUILD_FROM=esphome/esphome-base-amd64:2.0.0
|
||||||
FROM ${BUILD_FROM}
|
FROM ${BUILD_FROM}
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pip2 install --no-cache-dir -e .
|
RUN pip3 install --no-cache-dir -e .
|
||||||
|
|
||||||
ENV USERNAME=""
|
ENV USERNAME=""
|
||||||
ENV PASSWORD=""
|
ENV PASSWORD=""
|
||||||
|
@ -6,7 +6,7 @@ COPY docker/rootfs/ /
|
|||||||
COPY setup.py setup.cfg MANIFEST.in /opt/esphome/
|
COPY setup.py setup.cfg MANIFEST.in /opt/esphome/
|
||||||
COPY esphome /opt/esphome/esphome
|
COPY esphome /opt/esphome/esphome
|
||||||
|
|
||||||
RUN pip2 install --no-cache-dir -e /opt/esphome
|
RUN pip3 install --no-cache-dir -e /opt/esphome
|
||||||
|
|
||||||
# Build arguments
|
# Build arguments
|
||||||
ARG BUILD_VERSION=dev
|
ARG BUILD_VERSION=dev
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM esphome/esphome-base-amd64:1.8.3
|
FROM esphome/esphome-base-amd64:2.0.0
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apt-get update \
|
apt-get update \
|
||||||
@ -12,7 +12,7 @@ RUN \
|
|||||||
/var/lib/apt/lists/*
|
/var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements_test.txt /requirements_test.txt
|
COPY requirements_test.txt /requirements_test.txt
|
||||||
RUN pip2 install --no-cache-dir wheel && pip2 install --no-cache-dir -r /requirements_test.txt
|
RUN pip3 install --no-cache-dir wheel && pip3 install --no-cache-dir -r /requirements_test.txt
|
||||||
|
|
||||||
VOLUME ["/esphome"]
|
VOLUME ["/esphome"]
|
||||||
WORKDIR /esphome
|
WORKDIR /esphome
|
||||||
|
@ -10,6 +10,6 @@ if bashio::config.has_value 'esphome_version'; then
|
|||||||
esphome_version=$(bashio::config 'esphome_version')
|
esphome_version=$(bashio::config 'esphome_version')
|
||||||
full_url="https://github.com/esphome/esphome/archive/${esphome_version}.zip"
|
full_url="https://github.com/esphome/esphome/archive/${esphome_version}.zip"
|
||||||
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
|
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
|
||||||
pip2 install -U --no-cache-dir "${full_url}" \
|
pip3 install -U --no-cache-dir "${full_url}" \
|
||||||
|| bashio::exit.nok "Failed installing esphome pinned version."
|
|| bashio::exit.nok "Failed installing esphome pinned version."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user