This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
forked from enableiot/iotanalytics-backend
-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (78 loc) · 2.04 KB
/
makefile.yaml
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
name: End2End Test
on:
pull_request:
branches:
- develop
push:
branches:
- develop
- '**-debugtest'
jobs:
build:
env:
SELF_HOSTED_RUNNER: true
runs-on: private
steps:
- uses: actions/checkout@v3
with:
repository: Open-IoT-Service-Platform/platform-launcher.git
ref: 'develop'
path: platform-launcher
- name: Setup main repo + subrepos
shell: bash
run: |
export TERM=vt100
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
sudo apt install jq
fi
cd platform-launcher
git submodule update --init --recursive
make update
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: platform-launcher/oisp-backend
- name: Prepare platform
shell: bash
working-directory: platform-launcher
run: |
export TERM=vt100
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
cd util && \
bash setup-ubuntu20.04.sh
else
make restart-cluster
fi
- name: Build platform
working-directory: platform-launcher
shell: bash
run: |
set +o pipefail
export TERM=vt100
yes | DOCKER_TAG=test NODOCKERLOGIN=true DEBUG=true make build
- name: E2E Test
id: e2etest
working-directory: platform-launcher
shell: bash
run: |
set +e
export TERM=vt100
export PATH=$PATH:/snap/bin
make import-images DOCKER_TAG=test DEBUG=true
docker image prune -a -f
rm -rf oisp-*
npm install nodemailer
export NODOCKERLOGIN=true
retval=2
loops=0
export DOCKER_TAG=test
export USE_LOCAL_REGISTRY=true
until [ ${retval} -eq 0 ] || [ ${loops} -gt 3 ]; do
make undeploy-oisp
(for i in {1..20}; do sleep 60; echo .; done&) && make deploy-oisp-test
make test
retval=$?
loops=$((loops+1))
done
echo Test return value: ${retval}
exit ${retval}