aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--Pipfile3
-rw-r--r--docker/ci.Dockerfile15
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
diff --git a/Pipfile b/Pipfile
index 0c5761e..b2ec729 100644
--- a/Pipfile
+++ b/Pipfile
@@ -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