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

Commit e4d925e

Browse files
authored
update dependencies (#185)
* update dependencies * fix Travis build (NPM cache path)
1 parent 384ea8f commit e4d925e

File tree

9 files changed

+2368
-2213
lines changed

9 files changed

+2368
-2213
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
dist: xenial
2+
sudo: yes
13
language: python
24
python:
3-
- "3.6"
5+
- "3.7"
6+
services:
7+
- docker
48
install:
59
- pip install tox tox-travis coveralls
10+
- pip install pipenv
11+
- pipenv install --dev
612
- nvm install 7.4
713
- npm install -g eslint
814
script:
9-
- tox
15+
- make test docker
1016
after_success:
1117
- coveralls

Dockerfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
FROM alpine:3.7
2-
MAINTAINER Henning Jacobs <[email protected]>
1+
FROM python:3.7-alpine3.8
32

4-
EXPOSE 8080
3+
WORKDIR /
4+
5+
RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates
6+
7+
COPY Pipfile.lock /
8+
COPY pipenv-install.py /
59

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

13-
COPY scm-source.json /
14-
15-
COPY Pipfile /
16-
COPY Pipfile.lock /
16+
FROM python:3.7-alpine3.8
1717

1818
WORKDIR /
19-
RUN pipenv install --system --deploy --ignore-pipfile
19+
20+
COPY --from=0 /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages
2021

2122
COPY kube_ops_view /kube_ops_view
2223

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

26-
ENTRYPOINT ["/usr/bin/python3", "-m", "kube_ops_view"]
27+
ENTRYPOINT ["/usr/local/bin/python", "-m", "kube_ops_view"]

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
IMAGE ?= hjacobs/kube-ops-view
44
VERSION ?= $(shell git describe --tags --always --dirty)
55
TAG ?= $(VERSION)
6-
GITHEAD = $(shell git rev-parse HEAD)
7-
GITURL = $(shell git config --get remote.origin.url)
8-
GITSTATUS = $(shell git status --porcelain || echo "no changes")
96
TTYFLAGS = $(shell test -t 0 && echo "-it")
107

118
default: docker
@@ -14,13 +11,15 @@ clean:
1411
rm -fr kube_ops_view/static/build
1512

1613
test:
17-
tox
14+
pipenv run flake8
15+
pipenv run coverage run --source=kube_ops_view -m py.test
16+
pipenv run coverage report
1817

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

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

@@ -29,7 +28,3 @@ push: docker
2928

3029
mock:
3130
docker run $(TTYFLAGS) -p 8080:8080 "$(IMAGE):$(TAG)" --mock
32-
33-
scm-source.json: .git
34-
@echo '{"url": "git:$(GITURL)", "revision": "$(GITHEAD)", "author": "$(USER)", "status": "$(GITSTATUS)"}' > scm-source.json
35-

Pipfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ requests = "*"
1313
stups-tokens = ">=1.1.19"
1414
redlock-py = "*"
1515
json-delta = ">=2.0"
16-
kubernetes = "*"
16+
kubernetes = "==7.0.0a1"
1717
flask = "*"
1818
flask-oauthlib = "*"
1919

@@ -24,7 +24,12 @@ flask-oauthlib = "*"
2424
pytest = "*"
2525
pipenv = "*"
2626

27+
pytest-cov = "*"
28+
coveralls = "*"
2729

2830
[requires]
2931

30-
python_version = "3.6"
32+
python_version = "3.7"
33+
34+
[pipenv]
35+
allow_prereleases = true

Pipfile.lock

Lines changed: 290 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)