forked from coreos/kpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
73 lines (63 loc) · 1.16 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
stages:
- tests
- build
- release
variables:
IMAGE: quay.io/kubespray/kpm
PIP_CACHE_DIR: /pip-cache
cache:
paths:
- cache
- /pip-cache
key: "$CI_PROJECT_ID"
.job: &job
before_script:
- pip install -e .
- pip install -r requirements_dev.txt -U
script:
- make test
tags:
- kubernetes
image: quay.io/kubespray/kpm:build
unit-test:
<<: *job
stage: tests
image: quay.io/kubespray/kpm:build
script:
- pip install -U python-coveralls
- make test
- coveralls
flake8:
<<: *job
image: quay.io/kubespray/kpm:build
stage: tests
script:
- make flake8
yapf:
<<: *job
stage: tests
script:
- make yapf-test
# pylint:
# <<: *job
# image: python:2.7
# stage: code-style
# script:
# - pip install pylint
# - make pylint
.docker: &docker
variables:
DOCKER_HOST: tcp://localhost:2375
image: docker:git
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
services:
- docker:dind
tags:
- kubernetes
docker-build:
<<: *docker
stage: build
script:
- docker build --no-cache -t $IMAGE:$CI_BUILD_REF_NAME .
- docker push $IMAGE:$CI_BUILD_REF_NAME