-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
156 lines (139 loc) · 4.02 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# .gitlab-ci.yaml
stages:
- test
- build
test py39:
stage: test
image: pcr.teskalabs.com/python:3.9
tags:
- amd64
- docker
script:
- apt-get update
- pip install --upgrade pip
- pip install flake8
- pip install jinja2
- pip install Markdown
- pip install aiosmtplib
- pip install reportlab==3.6.6 # Freeze reportlab version because of https://github.com/xhtml2pdf/xhtml2pdf/issues/589
- pip install xhtml2pdf
- pip install Pillow
- pip install requests
- pip install aiohttp
- pip install -U git+https://github.com/TeskaLabs/asab
- pip install temp
- pip install aiokafka
- pip install slack-sdk
- pip install sentry-sdk
- pip install pytz
- python3 -m unittest test
test py310:
stage: test
image: pcr.teskalabs.com/python:3.10
tags:
- amd64
- docker
script:
- apt-get update
- pip install --upgrade pip
- pip install flake8
- pip install jinja2
- pip install Markdown
- pip install aiosmtplib
- pip install reportlab==3.6.6 # Freeze reportlab version because of https://github.com/xhtml2pdf/xhtml2pdf/issues/589
- pip install xhtml2pdf
- pip install Pillow
- pip install requests
- pip install aiohttp
- pip install -U git+https://github.com/TeskaLabs/asab
- pip install temp
- pip install aiokafka
- pip install slack-sdk
- pip install sentry-sdk
- pip install pytz
- python3 -m unittest test
test py311:
stage: test
image: pcr.teskalabs.com/python:3.11
tags:
- amd64
- docker
script:
- apt-get update
- pip install --upgrade pip
- pip install flake8
- pip install jinja2
- pip install Markdown
- pip install aiosmtplib
- pip install reportlab==4.0
- pip install xhtml2pdf
- pip install Pillow
- pip install requests
- pip install aiohttp
- pip install -U git+https://github.com/TeskaLabs/asab
- pip install temp
- pip install aiokafka
- pip install slack-sdk
- pip install sentry-sdk
- pip install pytz
- python3 -m unittest test
test flake:
stage: test
image: pcr.teskalabs.com/python:3.11
tags:
- amd64
- docker
script:
- apt-get update
- pip install --upgrade pip
- pip install flake8
- pip install pyppeteer
- pip install jinja2
- pip install aiosmtplib
- pip install Markdown
- pip install aiohttp
- pip install temp
- pip install aiokafka
- pip install slack-sdk
- pip install sentry-sdk
- pip install pytz
- pip install -U git+https://github.com/TeskaLabs/asab
- python3 -m flake8 asabiris
build docker:
stage: build
image: pcr.teskalabs.com/docker:24
tags:
# The shell Gitlab runner has to be used for this
- shell
only:
# Execute only for master/main branch
- main
before_script:
- docker info
# We want to run in the clean environment
- docker system prune -f
script:
- docker build -t $DOCKER_REGISTRY_IMAGE .
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" "$DOCKER_REGISTRY"
- docker push $DOCKER_REGISTRY_IMAGE
after_script:
# Clean-up
- docker container prune -f > /dev/null 2> /dev/null
- docker image prune -a -f > /dev/null 2> /dev/null
build docker-tag:
stage: build
image: pcr.teskalabs.com/docker:24
tags:
# The shell Gitlab runner has to be used for this
- shell
only:
- tags
before_script:
- docker info
# We want to run in the clean environment
- docker system prune -f
script:
- docker build -t "${DOCKER_REGISTRY_IMAGE}:${CI_COMMIT_TAG}" --no-cache .
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" "$DOCKER_REGISTRY"
- docker push "${DOCKER_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
- docker rmi "${DOCKER_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"