-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
114 lines (102 loc) · 2.04 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
variables:
FACTORY_PRODUCT_NAME: pyqgis-server
FACTORY_PACKAGE_TYPE: application
stages:
- test
- build
- docker
- deploy
- release
- post_release
#-----------------
# Tests
#-----------------
.tests:
image: ${REGISTRY_URL}/factory-ci-runner:qgis-${QGIS_FLAVOR}
stage: test
script:
- source ~/.bashrc
- make install install-tests
- pip list -l
- make test
tags:
- factory-plain
variables:
ASYNC_TEST_TIMEOUT: "20"
tests:
extends: .tests
resource_group: py_qgis_server_tests
parallel:
matrix:
- QGIS_FLAVOR: ['ltr', 'release', '3.28']
#---------------
# Build
#---------------
build:
image: ${REGISTRY_URL}/factory-ci-runner:python
stage: build
script:
- source ~/.bashrc
- make dist deliver
environment:
name: snap
tags:
- infrav3-plain
only:
refs:
- tags
- master
except:
- schedules
- triggers
# Docker build
include: '/docker/.gitlab-ci.yml'
tickets:
stage: post_release
only:
- tags
needs:
- "release:release"
- "release:ltr"
image:
name: $REGISTRY_URI/infra/ci-tools:latest
script:
- create_ticket.py
tags:
- factory-plain
gitlab_release:
stage: release
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
# Running only when the tag is like X.Y.Z
when: always
- when: never
image:
name: $REGISTRY_URI/infra/ci-tools:latest
script:
- gitlab_release
tags:
- factory-plain
monthly-release:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
allow_failure: false
- when: manual
allow_failure: true
script:
- >
curl -v -i
--header 'Content-Type:application/json'
--header "PRIVATE-TOKEN: ${BOT_TOKEN}"
--data '{
"id":"'"${CI_PROJECT_ID}"'",
"title":"New monthly release",
"description":"New monthly bugfix release of QGIS",
"labels":"qgis",
"assignee_ids":[5]
}'
https://projects.3liz.org/api/v4/projects/${CI_PROJECT_ID}/issues
tags:
- factory-plain