-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
126 lines (126 loc) · 3.11 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Generated from .gitlab-ci.jsonnet
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
---
build-image:
before_script:
- docker info
- docker login -u failfast-ci+gitlabci -p $QUAY_TOKEN quay.io
image: docker:git
script:
- 'docker build --no-cache -t quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8} . '
- docker push quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
services:
- docker:dind
stage: build_image
tags:
- kubernetes
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
cache:
paths:
- cache
container-release:
before_script:
- docker info
- docker login -u failfast-ci+gitlabci -p $QUAY_TOKEN quay.io
image: docker:git
only:
- master
- tags
script:
- docker pull quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
- docker tag quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8} quay.io/failfast-ci/failfast:${CI_COMMIT_REF_SLUG}-${SHA8}
- docker push quay.io/failfast-ci/failfast:${CI_COMMIT_REF_SLUG}-${SHA8}
- docker pull quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
- docker tag quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8} quay.io/failfast-ci/failfast:alpha
- docker push quay.io/failfast-ci/failfast:alpha
services:
- docker:dind
stage: docker_release
tags:
- kubernetes
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
flake8:
allow_failure: true
before_script:
- cd /opt/failfast-ci
- pip install flake8
image: quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
script:
- make flake8
stage: tests
tags:
- kubernetes
variables:
GIT_STRATEGY: none
mypy_compile:
before_script:
- cd /opt/failfast-ci
- pip install mypy
image: quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
script:
- make mypy
stage: tests
tags:
- kubernetes
variables:
GIT_STRATEGY: none
pylint:
before_script:
- cd /opt/failfast-ci
- pip install pylint
image: quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
script:
- make pylint
stage: tests
tags:
- kubernetes
variables:
GIT_STRATEGY: none
stages:
- build_image
- tests
- docker_release
unit-tests:
before_script:
- cd /opt/failfast-ci
- pip install -r requirements_test.txt
image: quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
script:
- make test
stage: tests
tags:
- kubernetes
variables:
GIT_STRATEGY: none
unit-tests-manual:
before_script:
- cd /opt/failfast-ci
- pip install -r requirements_test.txt
image: quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
script:
- make test
stage: tests
tags:
- kubernetes
variables:
GIT_STRATEGY: none
when: manual
variables:
FAILFASTCI_NAMESPACE: failfast-ci
yapf:
allow_failure: true
before_script:
- cd /opt/failfast-ci
- pip install yapf
image: quay.io/failfast-ci/failfast-cibuild:${CI_COMMIT_REF_SLUG}-${SHA8}
script:
- make yapf-diff
stage: tests
tags:
- kubernetes
variables:
GIT_STRATEGY: none