-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
79 lines (71 loc) · 1.52 KB
/
.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
image: python:3.7.2
stages:
- test
- build
- deploy
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- ~/.cache/pip/
before_script:
- pip install pipenv
- pipenv install --ignore-pipfile --dev
lint:
stage: test
script:
- pipenv run lint
test:
stage: test
script:
- pipenv run test
artifacts:
paths:
- htmlcov/
publish-coverage:
stage: deploy
dependencies:
- test
script:
- mv htmlcov/ public/
artifacts:
paths:
- public
only:
- master
build:
stage: deploy
image: docker:latest
only:
- tags
services:
- docker:dind
variables:
DOCKER_DRIVER: "overlay"
before_script:
- docker version
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
script:
- "docker build -t ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME} --pull ."
- "docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME}"
after_script:
- docker logout
build-arm32v6:
stage: deploy
image: docker:latest
only:
- tags
services:
- docker:dind
variables:
DOCKER_DRIVER: "overlay"
before_script:
- docker version
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
script:
- "docker build -t ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME}-arm32v6 --pull -f arm32v6.Dockerfile ."
- "docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME}"
after_script:
- docker logout