-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.yml
35 lines (30 loc) · 870 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
stages:
- python:flake8
- docker:deploy
variables:
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH"
python:flake8:
image: python:latest
stage: python:flake8
allow_failure: true
before_script:
- pip install flake8
- pip install --force-reinstall git+https://github.com/pycqa/pyflakes
script:
- cd /builds/SophieBot/sophie/
- python3 -m flake8 sophie_bot --max-line-length=120 --ignore=E203,E231,E701 | tee flake8-report.txt
artifacts:
paths: [flake8-report.txt]
docker:deploy:
image: docker:latest
stage: docker:deploy
allow_failure: false
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" registry.gitlab.com
script:
- docker build --pull -t "$DOCKER_IMAGE" .
- docker push "registry.gitlab.com/sophiebot/sophie:stable"
only:
- stable