-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
125 lines (108 loc) · 2.27 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
image: golang:1.19-buster
stages:
- test
- broker
- artifact
.gobuild:
stage: test
before_script:
- go version
script:
- make
- make cover
only:
refs:
- master
- dev
go1.13:
image: golang:1.13-buster
extends: .gobuild
go1.14:
image: golang:1.14-buster
extends: .gobuild
go1.15:
image: golang:1.15-buster
extends: .gobuild
go1.16:
image: golang:1.16-buster
extends: .gobuild
go1.17:
image: golang:1.17-buster
extends: .gobuild
go1.18:
image: golang:1.18-buster
extends: .gobuild
go1.19:
image: golang:1.19-buster
extends: .gobuild
.test-integration:
script:
- apt-get update -y && apt-get install -y mosquitto-clients
- make test-integration
- make test-detach
- ./test.network
needs:
- job: go1.13
- job: go1.14
- job: go1.15
- job: go1.16
- job: go1.17
- job: go1.18
- job: go1.19
only:
refs:
- master
- dev
# Must Mosquitto >= 1.6
# https://github.com/eclipse/mosquitto/blob/master/ChangeLog.txt#L616
test mosquitto 1.6:
stage: broker
services:
- name: eclipse-mosquitto:1.6
variables:
MQTT: "eclipse-mosquitto:1883"
extends: .test-integration
test emqx latest:
stage: broker
services:
- name: emqx/emqx:latest
alias: emqx
variables:
MQTT: "emqx:1883"
extends: .test-integration
test emqx 4.4.1:
stage: broker
services:
- name: emqx/emqx:4.4.1
alias: emqx
variables:
MQTT: "emqx:1883"
extends: .test-integration
test emqx deb:
stage: broker
before_script:
- apt-get update -y && apt-get install -y mosquitto-clients
- wget https://github.com/emqx/emqx/releases/download/v4.2.3/emqx-debian10-4.2.3-x86_64.deb
- dpkg -i emqx-debian10-4.2.3-x86_64.deb
- service emqx start
extends: .test-integration
build binary:
stage: artifact
script:
- make
artifacts:
paths:
- ncp
expire_in: 1 week
build image branch:
image: docker:20.10.5
stage: artifact
services:
- docker:20.10.5-dind
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
variables:
CONTAINER_IMAGE: ${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:latest
script:
- docker build --tag ${CONTAINER_IMAGE} .
- docker push ${CONTAINER_IMAGE}