Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
update dependencies (#185)
Browse files Browse the repository at this point in the history
* update dependencies

* fix Travis build (NPM cache path)
  • Loading branch information
hjacobs authored Dec 11, 2018
1 parent 384ea8f commit e4d925e
Show file tree
Hide file tree
Showing 9 changed files with 2,368 additions and 2,213 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
dist: xenial
sudo: yes
language: python
python:
- "3.6"
- "3.7"
services:
- docker
install:
- pip install tox tox-travis coveralls
- pip install pipenv
- pipenv install --dev
- nvm install 7.4
- npm install -g eslint
script:
- tox
- make test docker
after_success:
- coveralls
27 changes: 14 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
FROM alpine:3.7
MAINTAINER Henning Jacobs <[email protected]>
FROM python:3.7-alpine3.8

EXPOSE 8080
WORKDIR /

RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates

COPY Pipfile.lock /
COPY pipenv-install.py /

RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pipenv gevent && \
RUN /pipenv-install.py && \
rm -fr /usr/local/lib/python3.7/site-packages/pip && \
rm -fr /usr/local/lib/python3.7/site-packages/setuptools && \
apk del python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev && \
rm -rf /var/cache/apk/* /root/.cache /tmp/*

COPY scm-source.json /

COPY Pipfile /
COPY Pipfile.lock /
FROM python:3.7-alpine3.8

WORKDIR /
RUN pipenv install --system --deploy --ignore-pipfile

COPY --from=0 /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages

COPY kube_ops_view /kube_ops_view

ARG VERSION=dev
RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" /kube_ops_view/__init__.py

ENTRYPOINT ["/usr/bin/python3", "-m", "kube_ops_view"]
ENTRYPOINT ["/usr/local/bin/python", "-m", "kube_ops_view"]
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
IMAGE ?= hjacobs/kube-ops-view
VERSION ?= $(shell git describe --tags --always --dirty)
TAG ?= $(VERSION)
GITHEAD = $(shell git rev-parse HEAD)
GITURL = $(shell git config --get remote.origin.url)
GITSTATUS = $(shell git status --porcelain || echo "no changes")
TTYFLAGS = $(shell test -t 0 && echo "-it")

default: docker
Expand All @@ -14,13 +11,15 @@ clean:
rm -fr kube_ops_view/static/build

test:
tox
pipenv run flake8
pipenv run coverage run --source=kube_ops_view -m py.test
pipenv run coverage report

appjs:
docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:9.11-alpine npm install
docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:9.11-alpine npm run build
docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app -e NPM_CONFIG_CACHE=/tmp node:11.4-alpine npm install
docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app -e NPM_CONFIG_CACHE=/tmp node:11.4-alpine npm run build

docker: appjs scm-source.json
docker: appjs
docker build --build-arg "VERSION=$(VERSION)" -t "$(IMAGE):$(TAG)" .
@echo 'Docker image $(IMAGE):$(TAG) can now be used.'

Expand All @@ -29,7 +28,3 @@ push: docker

mock:
docker run $(TTYFLAGS) -p 8080:8080 "$(IMAGE):$(TAG)" --mock

scm-source.json: .git
@echo '{"url": "git:$(GITURL)", "revision": "$(GITHEAD)", "author": "$(USER)", "status": "$(GITSTATUS)"}' > scm-source.json

9 changes: 7 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requests = "*"
stups-tokens = ">=1.1.19"
redlock-py = "*"
json-delta = ">=2.0"
kubernetes = "*"
kubernetes = "==7.0.0a1"
flask = "*"
flask-oauthlib = "*"

Expand All @@ -24,7 +24,12 @@ flask-oauthlib = "*"
pytest = "*"
pipenv = "*"

pytest-cov = "*"
coveralls = "*"

[requires]

python_version = "3.6"
python_version = "3.7"

[pipenv]
allow_prereleases = true
454 changes: 290 additions & 164 deletions Pipfile.lock

Large diffs are not rendered by default.

Loading

0 comments on commit e4d925e

Please sign in to comment.