-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
34 lines (31 loc) · 955 Bytes
/
.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
stages:
- test
junit:
services:
- docker:18.09.7-dind
stage: test
image: "docker:18.09.7"
# save mosquitto log to debug errors
artifacts:
when: on_failure
paths:
- mosquitto.log
variables:
# Instruct Testcontainers to use the daemon of DinD.
DOCKER_HOST: "tcp://docker:2375"
# Improve performance with overlayfs.
DOCKER_DRIVER: overlay2
tags:
- BP-TDGT-CI
script:
- docker ps
- apk add --no-cache maven openjdk11 docker-compose curl mosquitto
- cd Docker
- ./dockerTest.sh
- cd ..
# config assumes broker is running on same machine as System under Test, so we need this environment for the tests
- echo "127.0.0.1 mosquitto" >> /etc/hosts
- mkdir -p /mosquitto/config/
- cp ./mosquitto/mosquitto.conf /mosquitto/config/
- $(which mosquitto) -c /mosquitto/config/mosquitto.conf > mosquitto.log 2>&1 &
- mvn test