From 592525370c603f0dd7569f2c1cfddc7ae0e4dcf8 Mon Sep 17 00:00:00 2001 From: Stefano Oldeman Date: Sun, 14 Jun 2020 14:43:28 +0200 Subject: [PATCH 1/2] feat: upgrade alpine to latest All changes in librdkafka can be found here: https://github.com/edenhill/librdkafka/releases All releases were notes as "maintenance release" with fixes and enhancements. --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a07d729..d93b7be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6-alpine3.9 as builder +FROM python:3.6-alpine3.12 as builder COPY . work WORKDIR /work @@ -6,18 +6,18 @@ WORKDIR /work RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ apk update && apk upgrade && \ apk add --no-cache --virtual build-dependencies build-base && \ - apk add --no-cache librdkafka-dev@edge~=1.1.0 && \ - pip install --install-option="--prefix=/install" . && \ + apk add --no-cache librdkafka-dev@edge~=1.4 && \ + pip install --prefix=/install --no-warn-script-location . && \ apk del build-dependencies -FROM python:3.6-alpine3.9 +FROM python:3.6-alpine3.12 ENV HOME=/home/pyrandall RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ apk update && apk upgrade && \ - apk add --no-cache librdkafka@edge~=1.1.0 && \ + apk add --no-cache librdkafka@edge~=1.4 && \ apk add ca-certificates && rm -rf /var/cache/apk/* && \ addgroup -S -g 1000 pyrandall && \ adduser -D -S -u 1000 -G pyrandall -h $HOME pyrandall From 4de6103cbce450f8b8883b4caa0b405a96dabc3b Mon Sep 17 00:00:00 2001 From: Stefano Oldeman Date: Sun, 14 Jun 2020 14:46:39 +0200 Subject: [PATCH 2/2] feat: add docker publish in travis-ci --- .travis.yml | 2 ++ publish.sh | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 publish.sh diff --git a/.travis.yml b/.travis.yml index f4e1ec7..9e90c8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,5 @@ jobs: script: make travis-pr-build - stage: "Test" script: make travis-pr-test + - stage: "Docker publish" + script: ./publish.sh diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..f6c2b62 --- /dev/null +++ b/publish.sh @@ -0,0 +1,19 @@ +DOCKER_IMAGE=pyrandall +GIT_SHORT_SHA=$(git rev-parse --short HEAD) +GIT_REF_NAME=$(git rev-parse --abbrev-ref HEAD) + +VERSION=$(