-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.yml
472 lines (456 loc) · 18 KB
/
project.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
---
#==============================================================================
# production config
#==============================================================================
production:
# command config ------------------------------------------------------------
commands:
# update command
update:
# pull project container
self: false
# build images on changes
images: false
# migrate database on changes
database: false
# print header and footer
extended: true
# task config ---------------------------------------------------------------
tasks:
# update command
update: &update
# update main repository
- name: ${PROJECT}_docker
actions: ['repo_update', 'script_restart', 'changes_notify']
target: '.'
source: '[email protected]:C3S/collecting_society_docker.git'
version: '${BRANCH}'
upstream: false
# notifications added, when files were changed
changes:
- name: 'update script was updated'
files: 'scripts/update'
- name: '∇ DOCKERFILE was updated!'
files: 'services/build/Dockerfile'
level: 'note'
data: [
'You should rebuild the docker images:',
'$ docker-compose build'
]
- name: '∇ EXAMPLE FILES were updated'
files: '.example'
level: 'note'
data: [
'You should diff and adjust the example files:',
'$ ./scripts/update diff'
]
# update project repos
- name: update project repos
actions: ['repo_update', 'changes_notify']
targetpath: 'volumes/shared/src'
upstream: false
version: '${BRANCH}'
batch:
- name: collecting_society
source: '[email protected]:C3S/collecting_society.git'
changes:
- name: '∇ DATABASE structure has changed'
files: ['.py', '.xml']
level: 'note'
data: [
'You should update the database:',
'$ docker-compose run --rm erpserver db-update'
]
- name: portal_web
source: '[email protected]:C3S/portal_web.git'
- name: collecting_society_web
source: '[email protected]:C3S/collecting_society_web.git'
- name: collecting_society_worker
source: '[email protected]:C3S/collecting_society_worker.git'
- name: echoprint-server
source: '[email protected]:C3S/echoprint-server.git'
# update upstream repos
- name: update upstream repos
actions: ['repo_update']
targetpath: 'volumes/shared/src'
batch:
- name: tryton
source: 'https://github.com/tryton/tryton.git'
version: '${TRYTON_VERSION}'
- name: echoprint-codegen
source: 'https://github.com/C3S/echoprint-codegen.git'
version: 'master'
# link tryton modules
- name: link tryton modules
actions: ['path_link']
targetpath: 'volumes/shared/src/tryton/trytond/trytond/modules'
batch:
# upstream
- name: account
source: 'volumes/shared/src/tryton/modules/account'
- name: account_de_skr03
source: 'volumes/shared/src/tryton/modules/account_de_skr03'
- name: account_invoice
source: 'volumes/shared/src/tryton/modules/account_invoice'
- name: account_invoice_line_standalone
source: 'volumes/shared/src/tryton/modules/account_invoice_line_standalone'
- name: account_product
source: 'volumes/shared/src/tryton/modules/account_product'
- name: bank
source: 'volumes/shared/src/tryton/modules/bank'
- name: company
source: 'volumes/shared/src/tryton/modules/company'
- name: country
source: 'volumes/shared/src/tryton/modules/country'
- name: currency
source: 'volumes/shared/src/tryton/modules/currency'
- name: party
source: 'volumes/shared/src/tryton/modules/party'
- name: product
source: 'volumes/shared/src/tryton/modules/product'
- name: web_user
source: 'volumes/shared/src/tryton/modules/web_user'
# own
- name: collecting_society
source: 'volumes/shared/src/collecting_society'
# create basic folder structure
- name: create basic folder structure
actions: ['folder_create']
batch:
- name: 'volumes/shared/tmp'
- name: 'volumes/shared/tmp/logs'
# copy and diff example files
- name: copy and diff example files
actions: ['file_copy', 'file_diff']
batch:
- name: .env
ignore: ['^ENVIRONMENT', '^BRANCH=', '^BUILD=', '^GIT_SSH=',
'^GIT_USER_NAME=', '^GIT_USER_EMAIL=', '^GIT_USER_SIGNINGKEY',
'^DEBUGGER_WINPDB=', '^DEBUGGER_DEBUGPY=']
- name: services/database.env
ignore: ['^POSTGRES_PASSWORD=']
- name: services/erpserver.env
ignore: ['^PGPASSWORD=', '^TRYTON_EMAIL=']
- name: services/webgui.env
ignore: ['^PGPASSWORD=', '^PYRAMID_AUTHENTICATION_SECRET=',
'^PYRAMID_SESSION_SECRET=']
- name: services/webapi.env
ignore: ['^PGPASSWORD=', '^PYRAMID_AUTHENTICATION_SECRET=',
'^PYRAMID_SESSION_SECRET=']
- name: services/worker.env
ignore: ['^ECHOPRINT_TOKEN=', '^WORKER_PROTEUS_PASSWORD=']
- name: volumes/shared/config/trytond/production.conf
ignore: ['^privatekey =', '^certificate =', '^super_pwd =']
- name: volumes/shared/config/trytond/staging.conf
ignore: ['^privatekey =', '^certificate =', '^super_pwd =']
- name: volumes/shared/src/collecting_society_worker/config.ini
ignore: ['^srcpw =', '^destpw =']
# copy tryton admin password example file
- name: copy trytond admin password example file
actions: ['file_copy']
target: 'volumes/shared/config/trytond/passfile'
# symlink docker override file
- name: symlink docker override file
actions: ['path_link']
target: 'docker-compose.override.yml'
source: 'docker-compose.production.yml'
# status command
status: *update
# diff command
diff: *update
# pull command
pull: *update
# pull command
checkout: *update
# pull command
delete: *update
# pull command
commit: *update
# push command
push: *update
# merge command
merge: *update
# promote command
promote: *update
# action config -------------------------------------------------------------
actions:
# update_repo action group
repo_update: [
git_clone, git_user, git_origin, git_status,
git_fetch, git_checkout, git_track, git_pull
]
# diff_file action
file_diff:
# regex for lines to be ignored in diffs
ignore: [^#, ^\/\/, ^\n$]
# git status action
git_status:
# stop all tasks on error
stop_all: false
# stop further actions on error
stop_action_group: true
# git clone action
git_clone:
# create the containing folder of the repo
create_folder: true
#==============================================================================
# staging config, inherits from production
#==============================================================================
staging:
tasks:
update:
# symlink docker override file
- name: symlink docker override file
source: 'docker-compose.staging.yml'
#==============================================================================
# testing config, inherits from staging
#==============================================================================
testing:
config:
update:
images: true
database: true
tasks:
update:
# create folder for tests output
- name: create folder for tests output
target: 'volumes/shared/tests'
actions: ['folder_create']
# symlink docker override file
- name: symlink docker override file
source: 'docker-compose.${ENVIRONMENT}.yml'
#==============================================================================
# development config, inherits from testing
#==============================================================================
development:
config:
update:
self: true
tasks:
update:
# create development folder structure
- name: create development folder structure
actions: ['folder_create']
batch:
- name: 'code'
- name: 'services/config'
# symlink project repos
- name: symlink project repos
actions: ['path_link']
targetpath: 'code'
batch:
- name: collecting_society
source: 'volumes/shared/src/collecting_society'
- name: portal_web
source: 'volumes/shared/src/portal_web'
- name: collecting_society_web
source: 'volumes/shared/src/collecting_society_web'
- name: echoprint-server
source: 'volumes/shared/src/echoprint-server'
- name: collecting_society_worker
source: 'volumes/shared/src/collecting_society_worker'
# symlink script folders for services
- name: symlink script folders for services
actions: ['path_link']
targetpath: 'services'
batch:
- name: deploy
source: 'volumes/shared/deploy'
- name: healthcheck
source: 'volumes/shared/healthcheck'
- name: pip
source: 'volumes/shared/config/pip'
# symlink configuration files for applications
- name: symlink configuration files for applications
actions: ['path_link']
targetpath: 'services/config'
batch:
# tryton
- name: collecting_society.development.conf
source: 'volumes/shared/config/trytond/development.conf'
- name: collecting_society.staging.conf
source: 'volumes/shared/config/trytond/staging.conf'
- name: collecting_society.testing.conf
source: 'volumes/shared/config/trytond/testing.conf'
- name: collecting_society.production.conf
source: 'volumes/shared/config/trytond/production.conf'
- name: collecting_society.passfile
source: 'volumes/shared/config/trytond/passfile'
# pyramid
- name: portal_web.development.ini
source: 'volumes/shared/src/portal_web/development.ini'
- name: portal_web.staging.ini
source: 'volumes/shared/src/portal_web/staging.ini'
- name: portal_web.staging.ini
source: 'volumes/shared/src/portal_web/staging.ini'
- name: portal_web.testing.ini
source: 'volumes/shared/src/portal_web/testing.ini'
- name: collecting_society_web.development.ini
source: 'volumes/shared/src/collecting_society_web/development.ini'
- name: collecting_society_web.staging.ini
source: 'volumes/shared/src/collecting_society_web/staging.ini'
- name: collecting_society_web.staging.ini
source: 'volumes/shared/src/collecting_society_web/staging.ini'
- name: collecting_society_web.testing.ini
source: 'volumes/shared/src/collecting_society_web/testing.ini'
# worker
- name: collecting_society_worker.config.ini
source: 'volumes/shared/src/collecting_society_worker/config.ini'
# symlink paths and scripts for easy access
- name: symlink paths and scripts for easy access
actions: ['path_link']
batch:
- name: cli
source: 'volumes/shared/cli'
- name: .flake8
source: 'volumes/shared/.flake8'
- name: tests
source: 'volumes/shared/tests'
- name: docs
source: 'volumes/shared/docs/build/html'
# checkout repos of pinned pip packages for reference
- name: checkout repos of pinned pip packages for reference
actions: ['git_clone', 'git_fetch', 'git_checkout']
targetpath: 'volumes/shared/ref'
condition: '${CHECKOUT_REFERENCES}'
batch:
- name: colander
source: 'https://github.com/Pylons/colander.git'
version: 'tags/2.0'
- name: cornice
source: 'https://github.com/Cornices/cornice.git'
version: 'tags/6.1.0'
- name: cornice_swagger
source: 'https://github.com/Cornices/cornice.ext.swagger.git'
version: 'tags/1.0.1'
- name: click
source: 'https://github.com/pallets/click.git'
version: 'tags/8.1.7'
- name: cryptacular
source: 'https://github.com/dholth/cryptacular.git'
version: 'master'
- name: deform
source: 'https://github.com/Pylons/deform.git'
version: 'tags/2.0.15'
- name: defusedxml
source: 'https://github.com/tiran/defusedxml.git'
version: 'tags/v0.7.1'
- name: forex-python
source: 'https://github.com/MicroPyramid/forex-python.git'
version: 'tags/v1.8'
- name: genshi
source: 'https://github.com/edgewall/genshi.git'
version: 'tags/0.7.9'
- name: gevent
source: 'https://github.com/gevent/gevent.git'
version: 'tags/24.2.1'
- name: html2text
source: 'https://github.com/Alir3z4/html2text.git'
version: 'tags/2024.2.26'
# - name: hurry.filesize
# source: '?'
# version: 'tags/0.9'
# => source not found
- name: lxml
source: 'https://github.com/lxml/lxml.git'
version: 'tags/lxml-5.3.0'
# - name: passlib
# source: 'https://foss.heptapod.net/python-libs/passlib'
# version: 'tags/1.7.4'
# => hg only
- name: Pillow
source: 'https://github.com/python-pillow/Pillow.git'
version: 'tags/10.4.0'
- name: polib
source: 'https://github.com/izimobil/polib.git'
version: 'tags/1.2.0'
- name: psycopg2
source: 'https://github.com/psycopg/psycopg2.git'
version: 'tags/2.9.9'
- name: pycountry
source: 'https://github.com/flyingcircusio/pycountry.git'
version: 'tags/24.6.1'
- name: pydot
source: 'https://github.com/pydot/pydot.git'
version: 'tags/v3.0.1'
- name: pydub
source: 'https://github.com/jiaaro/pydub.git'
version: 'tags/v0.25.1'
- name: pyechonest
source: 'https://github.com/echonest/pyechonest.git'
version: 'tags/9.0.0'
- name: pyopenssl
source: 'https://github.com/pyca/pyopenssl.git'
version: 'tags/24.2.1'
- name: pytaglib
source: 'https://github.com/supermihi/pytaglib.git'
version: 'tags/v3.0.0'
- name: pyramid
source: 'https://github.com/Pylons/pyramid.git'
version: 'tags/2.0.2'
- name: pyramid_beaker
source: 'https://github.com/Pylons/pyramid_beaker.git'
version: 'tags/0.8'
- name: pyramid_debugtoolbar
source: 'https://github.com/Pylons/pyramid_debugtoolbar.git'
version: 'tags/4.10'
- name: pyramid_chameleon
source: 'https://github.com/Pylons/pyramid_chameleon.git'
version: 'tags/0.3'
- name: pyramid_mailer
source: 'https://github.com/Pylons/pyramid_mailer.git'
version: 'tags/0.15.1'
- name: python-dateutil
source: 'https://github.com/dateutil/dateutil.git'
version: 'tags/2.9.0.post0'
- name: python-Levenshtein
source: 'https://github.com/ztane/python-Levenshtein.git'
version: 'master'
- name: python-magic
source: 'https://github.com/ahupp/python-magic.git'
version: 'tags/0.4.27'
- name: python-stdnum
source: 'https://github.com/arthurdejong/python-stdnum/'
version: 'tags/1.20'
# - name: python-sql
# source: 'https://hg.tryton.org/python-sql'
# version: 'tags/1.3.0'
# => hg only
- name: pytz
source: 'https://github.com/stub42/pytz.git'
version: 'tags/release_2024.2'
- name: raven-python
source: 'https://github.com/getsentry/raven-python.git'
version: 'tags/6.10.0'
# - name: relatorio
# source: 'https://hg.tryton.org/relatorio'
# version: 'tags/0.10.0'
# => hg only
- name: requests
source: 'https://github.com/requests/requests.git'
version: 'tags/v2.32.3'
# - name: selenium
# source: 'https://github.com/SeleniumHQ/selenium.git'
# version: 'tags/selenium-4.0.0'
# => > 200 MB
- name: simpleeval
source: 'https://github.com/danthedeckie/simpleeval.git'
version: 'tags/0.9.13'
- name: waitress
source: 'https://github.com/Pylons/waitress.git'
version: 'tags/v3.0.0'
- name: weasyprint
source: 'https://github.com/Kozea/WeasyPrint.git'
version: 'tags/v62.3'
- name: webob
source: 'https://github.com/Pylons/webob.git'
version: 'tags/1.8.8'
- name: webpy
source: 'https://github.com/webpy/webpy.git'
version: 'tags/0.62'
- name: webtest
source: 'https://github.com/Pylons/webtest.git'
version: 'tags/3.0.1'
- name: werkzeug
source: 'https://github.com/pallets/werkzeug.git'
version: 'tags/3.0.4'