Skip to content

Commit f66d066

Browse files
committed
add builder dockerfile, update circleci to use
1 parent fe26b2d commit f66d066

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

.circleci/config.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,22 @@ version: 2.1
33
jobs:
44
gatekeeper_test:
55
docker:
6-
- image: circleci/python:3
6+
- image: benmoose/gatekeeper-builder
77
steps:
88
- checkout
99
- setup_remote_docker
10-
- run:
11-
name: Build images
12-
command: |
13-
docker-compose build
10+
# - run:
11+
# name: Build images
12+
# command: |
13+
# docker-compose build
1414
- run:
1515
name: Check code style
1616
command: |
17-
docker-compose -f docker-compose.yml \
18-
run --rm --no-deps --entrypoint ./run-linter.sh server --check
17+
./run-linter.sh --check
1918
- run:
2019
name: Run tests
2120
command: |
22-
docker-compose -f docker-compose.yml \
23-
run --rm --entrypoint ./run-tests.sh server
21+
./run-tests.sh -vv
2422
2523
workflows:
2624
version: 2

operations/django/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ENV PYTHONUNBUFFERED 1
33

44
WORKDIR /wheels
55

6-
COPY requirements*.txt requirements/
7-
RUN pip wheel -r ./requirements/requirements.test.txt
6+
COPY requirements.txt requirements
7+
RUN pip wheel -r ./requirements/requirements.txt
88

99
FROM python:3.7-slim
1010
ENV PYTHONUNBUFFERED 1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM python:3.7 AS builder
2+
ENV PYTHONUNBUFFERED 1
3+
4+
WORKDIR /wheels
5+
6+
COPY requirements*.txt requirements/
7+
RUN pip wheel -r ./requirements/requirements.test.txt
8+
9+
FROM python:3.7-slim
10+
ENV PYTHONUNBUFFERED 1
11+
12+
COPY --from=builder /wheels /wheels
13+
14+
RUN pip install -r /wheels/requirements/requirements.test.txt -f /wheels \
15+
&& rm -rf /wheels \
16+
&& rm -rf /root/.cache/pip/*
17+
18+
WORKDIR /usr/src/app
19+
COPY . .

0 commit comments

Comments
 (0)