Skip to content

Commit

Permalink
feat(pre-commit): bump version ot 2.7.1 and add dockerfile for full v…
Browse files Browse the repository at this point in the history
…ariant
  • Loading branch information
aexvir committed Sep 15, 2020
1 parent 777eea3 commit f6bd65d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,12 @@ For more information, see http://www.pgbouncer.org/usage.html.

## kiwicom/pre-commit

- Base image: `python:3.7-alpine`
- Base image: `python:3.8-alpine`
- packages: `git npm bash build-base pre-commit`

We use this image to run our `pre-commit` hooks in CI
We also offer a `kiwicom/pre-commit:vX.X.X-full` where besides having the latest python version we also
support previous versions up to Python 3.7

## kiwicom/python-rancher-compose

Expand Down Expand Up @@ -429,7 +431,7 @@ deploy:
- Base image: `python:3.8-alpine`
- Packages: `spectacles` (https://github.com/spectacles-ci/spectacles)

Spectacles is a command-line, continuous integration tool for Looker and LookML. spectacles runs validators which perform a range of tests on your Looker instance and your LookML.
Spectacles is a command-line, continuous integration tool for Looker and LookML. spectacles runs validators which perform a range of tests on your Looker instance and your LookML.

## kiwicom/spectral

Expand Down
2 changes: 1 addition & 1 deletion pre-commit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.8-alpine

ENV version=2.2.0
ENV version=2.7.1

RUN apk add --no-cache git npm bash build-base && \
# npm needs unsafe-perm because of https://github.com/nodejs/docker-node/issues/813
Expand Down
26 changes: 26 additions & 0 deletions pre-commit/Dockerfile.full
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM python:3.8-alpine

ENV PATH="$PATH:/root/.pyenv/bin:/root/.pyenv/shims"
ENV version=2.7.1

RUN apk add --no-cache --virtual=.build-deps curl git linux-headers openssl-dev sqlite-dev readline-dev bzip2-dev ncurses-dev sqlite-dev patch xz-dev zlib-dev && \
apk add --no-cache --virtual=.run-deps bash build-base curl-dev openssl readline libffi libbz2 libffi-dev bzip2 ncurses sqlite sqlite-libs zlib xz postgresql-dev ca-certificates && \
curl --location https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash && \
pyenv update && \
pyenv install 3.7.8 && \
pyenv install 3.8.4 && \
pyenv global 3.8.4 3.7.8 && \
pyenv rehash && \
apk add --no-cache git npm bash build-base && \
npm config set unsafe-perm true && \
pip install pre-commit==$version && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/* && \
find /root/.pyenv/versions -type d '(' -name '__pycache__' -o -name 'test' -o -name 'tests' ')' -exec rm -rfv '{}' + && \
find /root/.pyenv/versions -type f '(' -name '*.py[co]' -o -name '*.exe' ')' -exec rm -fv '{}' +

CMD ["pre-commit"]

LABEL name=pre-commit version=$version \
maintainer="Kiwi.com Platform <software.platform@kiwi.com>"

0 comments on commit f6bd65d

Please sign in to comment.