From 7262f260340bcf436d338471cc085e38ff6a8478 Mon Sep 17 00:00:00 2001 From: Klafyvel Date: Thu, 2 Aug 2018 16:04:59 +0200 Subject: [PATCH] =?UTF-8?q?Il=20faut=20=C3=AAtre=20agile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 16 ++++++++++++++++ Dockerfile | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..633ce58 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +image: docker +services: +- docker:dind + +stages: +- build + +build_job: + stage: build + script: + - apk add --no-cache curl + - docker build -f Dockerfile -t gitlab.rezometz.org:5678/klafyvel/klafirc + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab.rezometz.org:5678 + - docker push gitlab.rezometz.org:5678/klafyvel/klafirc:latest + - "curl -X POST lupercus.rez -d \"$API_VARS\" -H \"Content-Type: application/json\"" + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7733378 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3 +ENV PYTHONUNBUFFERED 1 +RUN mkdir /var/log/klafirc +RUN mkdir /etc/klafirc +RUN mkdir /klafirc +ADD . /klafirc +RUN cp /klafirc/bots.yaml /etc/klafirc +WORKDIR /klafirc +RUN pip install -r requirements.txt +CMD sleep 5; python -m klafirc