Newer
Older
stages:
- build
- test
- publish
.series:
parallel:
matrix:
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
build:
stage: build
extends: .series
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}/${SERIES}"
--dockerfile "${CI_PROJECT_DIR}/${SERIES}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/tryton:${SERIES}-${CI_COMMIT_SHA}"
--tar-path image-${SERIES}.tar
artifacts:
paths:
- image-{$SERIES}.tar
build-office:
stage: build
extends: build
needs:
- build
script:
- /kaniko/executor
--build-arg REGISTRY_IMAGE="${CI_REGISTRY_IMAGE}"
--build-arg TAG_SUFFIX="-${CI_COMMIT_SHA}"
--context "${CI_PROJECT_DIR}/${SERIES}"
--dockerfile "${CI_PROJECT_DIR}/${SERIES}/office/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/tryton:${SERIES}-office-${CI_COMMIT_SHA}"
--tar-path image-${SERIES}-office.tar
artifacts:
paths:
- image-{$SERIES}-office.tar
test:
stage: test
extends: .series
needs:
- build
image: ${CI_REGISTRY_IMAGE}/tryton:${SERIES}-${CI_COMMIT_SHA}
variables:
DB_CACHE: /tmp
TRYTOND_DATABASE_URI: sqlite://
script:
- python3 -m unittest discover -vv -f -s trytond.tests
- python3 -m unittest discover -vv -f -s trytond.modules -p test_module.py
parallel:
matrix:
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
test-run:
extends: test
script:
- python3 -m trytond.tests.run-tests -vv -f -m --no-doctest
parallel:
matrix:
- SERIES: ["5.0", "6.0"]
test-office:
extends: test
needs:
- build-office
image: ${CI_REGISTRY_IMAGE}/tryton:${SERIES}-office-${CI_COMMIT_SHA}
test-office-run:
extends: test-run
needs:
- build-office
image: ${CI_REGISTRY_IMAGE}/tryton:${SERIES}-office-${CI_COMMIT_SHA}
publish:
stage: publish
extends: .series
needs:
- build
- test
- test-run
image:
name: gcr.io/go-containerregistry/crane:debug
entrypoint: [""]
script:
- crane auth login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD} ${DOCKER_SERVER}
- crane push image-${SERIES}.tar tryton/tryton:${SERIES}
rules:
- if: $CI_COMMIT_BRANCH =~ /^branch\/.*/
publish-office:
extends: publish
needs:
- build-office
- test-office
- test-office-run
script:
- crane auth login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD} ${DOCKER_SERVER}
- crane push image-${SERIES}-office.tar tryton/tryton:${SERIES}-office
publish-latest:
extends: publish
needs:
- publish
script:
- crane auth login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD} ${DOCKER_SERVER}
- crane push image-${SERIES}.tar tryton/tryton:latest
parallel:
matrix:
publish-office-latest:
extends: publish-latest
needs:
- publish-office
script:
- crane auth login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD} ${DOCKER_SERVER}
- crane push image-${SERIES}-office.tar tryton/tryton:office
parallel:
matrix: