Il faut être agile

This commit is contained in:
Klafyvel 2018-08-02 16:04:59 +02:00
parent 1c0c04bd45
commit 7262f26034
2 changed files with 26 additions and 0 deletions

16
.gitlab-ci.yml Normal file
View file

@ -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\""

10
Dockerfile Normal file
View file

@ -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