This repository was archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
103 lines (96 loc) · 2.71 KB
/
makefile.yaml
File metadata and controls
103 lines (96 loc) · 2.71 KB
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
name: E2E Test
on:
pull_request:
branches:
- develop
push:
branches:
- develop
jobs:
build:
env:
SELF_HOSTED_RUNNER: true
runs-on: private
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set up SDK
shell: bash
run: |
export TERM=vt100
python3 setup.py install --user
pip3 install pylint pycodestyle pydocstyle virtualenv coverage
- name: Run Linter
shell: bash
run: |
export TERM=vt100
export PATH=$PATH:$HOME/.local/bin
pylint oisp --score=y --disable=c0209 || exit 1
pycodestyle oisp || exit 1
pycodestyle test || exit 1
pydocstyle oisp --add-ignore=D105 || exit 1
- name: Checkout platform launcher
shell: bash
run: |
export TERM=vt100
export PATH=$PATH:$HOME/.local/bin
set +o pipefail
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
sudo apt install jq
fi
git clone https://github.com/Open-IoT-Service-Platform/platform-launcher.git
cd platform-launcher
git checkout develop
git submodule update --recursive --init
yes | make update
- name: Set up Platform Launcher
shell: bash
run: |
export TERM=vt100
export PATH=$PATH:$HOME/.local/bin
set +o pipefail
cd platform-launcher
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
cd util && \
bash setup-ubuntu20.04.sh
else
make restart-cluster
fi
- name: Build and deploy Platform Launcer
shell: bash
run: |
set +e
set +o pipefail
export TERM=vt100
export PATH=$PATH:$HOME/.local/bin:/snap/bin
cd platform-launcher
yes | DOCKER_TAG=test NODOCKERLOGIN=true DEBUG=true make build
make import-images DOCKER_TAG=test DEBUG=true
docker image prune -a -f
rm -rf oisp-*
npm install nodemailer
export NODOCKERLOGIN=true
retval=2;
export DOCKER_TAG=test
export USE_LOCAL_REGISTRY=true
until [ ${retval} -eq 0 ]; do
make undeploy-oisp
(for i in {1..20}; do sleep 60; echo .; done&) && make deploy-oisp-test
make test
retval=$?
done
FRONTEND_POD=$(kubectl -n oisp get pods | grep frontend | cut -f 1 -d " ")
kubectl -n oisp port-forward ${FRONTEND_POD} 4001:4001 &
- name: SDK E2E Test
shell: bash
run: |
set +e
export TERM=vt100
export PATH=$PATH:$HOME/.local/bin
sudo chmod -R 777 .
retval=2;
until [ ${retval} -eq 0 ]; do
make test
retval=$?
done