-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
147 lines (133 loc) · 2.96 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
stages:
- tests
- build
- qgis-plugin
- qgis-repository-edit
- qgis-repository-push
- deploy
- release
variables:
FACTORY_PRODUCT_NAME: wfsOutputExtension
FACTORY_PACKAGE_TYPE: plugin
GITLAB_SLUG: "lizmap/qgis-wfsoutputextension"
flake8:
image: ${REGISTRY_URL}/factory-ci-runner:python
stage: tests
script:
- flake8
tags:
- factory-plain
test:
stage: tests
parallel:
matrix:
- QGIS_VERSION: [
"3.22",
"3.28",
"3.34",
"3.40",
"nightly-release",
]
script:
- make -C tests FLAVOR=${QGIS_VERSION}
tags:
- factory-dind
version:
stage: tests
image:
name: $REGISTRY_URI/infra/ci-tools:latest
script:
- version-helper
tags:
- factory-plain
artifacts:
reports:
dotenv: build.env
package-zip:
dependencies:
- version
stage: build
image: $REGISTRY_URI/qgis-plugin-ci:latest
script:
- >
qgis-plugin-ci
package ${VERSION}
--plugin-repo-url https://packages.3liz.org/pub/${FACTORY_PRODUCT_NAME}-qgis-plugin/${STATUS}/
tags:
- factory-plain
artifacts:
untracked: true
expose_as: 'QGIS package'
paths:
- ${FACTORY_PRODUCT_NAME}.${VERSION}.zip
- plugins.xml
push-zip-fetch-repo:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
dependencies:
- version
- package-zip
stage: qgis-plugin
script:
# Upload into the plugin directory
- upload_to_packages_server ${FACTORY_PRODUCT_NAME}.${VERSION}.zip pub/${FACTORY_PRODUCT_NAME}-qgis-plugin/${STATUS}/
- upload_to_packages_server plugins.xml pub/${FACTORY_PRODUCT_NAME}-qgis-plugin/${STATUS}/
# Fetch XML files
- mkdir tmp_repository
- pull_folder_from_packages_server pub/server-plugins-repository/${STATUS}/ tmp_repository
# This CI job is running as "fabric" user, the next job is "factory"
- chmod 777 -R tmp_repository/
tags:
- fabric
artifacts:
paths:
- tmp_repository/*.xml
edit-repository:
stage: qgis-repository-edit
dependencies:
- package-zip
- push-zip-fetch-repo
before_script:
- PATH=$PATH:~/.local/bin
- pip3 install --user qgis-plugin-repo
script:
- qgis-plugin-repo merge plugins.xml tmp_repository/*.xml
tags:
- factory-dind
artifacts:
untracked: true
paths:
- tmp_repository/*.xml
push-repository:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: qgis-repository-push
dependencies:
- version
- edit-repository
script:
- upload_folder_to_packages_server tmp_repository/ pub/server-plugins-repository/${STATUS}/
tags:
- fabric
#
# Infrav2 packaging
#
deploy_snap_v2:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: deploy
dependencies:
- push-repository
script:
- update-snap-qgis-plugins
environment:
name: snap
tags:
- fabric
tickets:
stage: release
only:
- tags
image:
name: $REGISTRY_URI/infra/ci-tools:latest
script:
- create_ticket.py
tags:
- factory-plain