diff options
author | 2018-06-05 22:21:20 +0200 | |
---|---|---|
committer | 2018-06-05 22:21:20 +0200 | |
commit | 099446711c7cd3a7945d38e361a8f3498d0a8148 (patch) | |
tree | 88306fe0a1848a2a08b5188216f530f366ce9a38 | |
parent | change directory (diff) |
use a ci box
-rw-r--r-- | .gitlab-ci.yml | 8 | ||||
-rw-r--r-- | Pipfile | 3 | ||||
-rw-r--r-- | docker/ci.Dockerfile | 15 |
3 files changed, 22 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60dbcd5..083218a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: pythondiscord/snekbox-base:latest +image: pythondiscord/snekbox-ci:latest variables: DOCKER_DRIVER: overlay @@ -12,8 +12,8 @@ stages: build: stage: build script: - - cd /snekbox - - pwd - - ls -lah + - pipenv sync --dev - pipenv run lint - pipenv run test + - pipenv run buildbox + - pipenv run pushbox @@ -35,5 +35,8 @@ pushbox = "docker push pythondiscord/snekbox:latest" buildboxbase = "docker build -t pythondiscord/snekbox-base:latest -f docker/base.Dockerfile ." pushboxbase = "docker push pythondiscord/snekbox-base:latest" +buildci = "docker build -t pythondiscord/snekbox-ci:latest -f docker/ci.Dockerfile ." +pushci = "docker push pythondiscord/snekbox-ci:latest" + buildweb = "docker build -t pythondiscord/snekboxweb:latest -f docker/Dockerfile.webapp ." pushweb = "docker push pythondiscord/snekboxweb:latest" diff --git a/docker/ci.Dockerfile b/docker/ci.Dockerfile new file mode 100644 index 0000000..de19b53 --- /dev/null +++ b/docker/ci.Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.6-alpine3.7 + +RUN apk add --no-cache libstdc++ protobuf +RUN apk add --update build-base + +ENV PIPENV_VENV_IN_PROJECT=1 +ENV PIPENV_IGNORE_VIRTUALENVS=1 +ENV PIPENV_NOSPIN=1 +ENV PIPENV_HIDE_EMOJIS=1 +ENV PYTHONPATH=/snekbox + +RUN pip install pipenv + +COPY binaries/nsjail2.5-alpine-x86_64 /usr/sbin/nsjail +RUN chmod +x /usr/sbin/nsjail |