-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.drone.yml
119 lines (110 loc) · 3.58 KB
/
.drone.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
---
kind: pipeline
name: unit-tests
steps:
- name: bootstrap
image: signalwire/freeswitch-public-base
pull: always
commands:
- ./bootstrap.sh
- name: configure make and check
image: signalwire/freeswitch-public-base
pull: always
environment:
REPOTOKEN:
from_secret: repotoken
commands:
- export WORK_DIR=$PWD
- echo $WORK_DIR
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
- echo "deb http://ftp.de.debian.org/debian testing main" > /etc/apt/sources.list
- apt-get update
- apt-get -y -t testing install libmosquitto-dev
- apt-get -y install libfreeswitch-dev freeswitch-mod-console
- export REPOTOKEN=''
- rm -rf /etc/apt/auth.conf
- ./bootstrap.sh
- ./configure
- echo '#!/bin/bash\nmake -j`nproc --all` |& tee $WORK_DIR/unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > $WORK_DIR/build-status.txt\n' > build.sh
- chmod +x build.sh
- ./build.sh
- (make install || true)
- mkdir -p $WORK_DIR/tests/unit
- cat /proc/sys/kernel/core_pattern
- ./run-tests-parallel.sh
- echo 0 > $WORK_DIR/tests/unit/run-tests-status.txt
- ./collect-test-logs.sh && exit 0 || echo 'Some tests failed'
- ls -la ./test
- echo 1 > $WORK_DIR/tests/unit/run-tests-status.txt
- ls -la /cores
- mkdir -p $WORK_DIR/tests/unit/logs
- (mv test/artifacts.html $WORK_DIR/tests/unit/logs/ || true)
- (mv test/log_run-tests_*.html $WORK_DIR/tests/unit/logs/ || true)
- (mv test/backtrace_*.txt $WORK_DIR/tests/unit/logs/ || true)
- ls -la $WORK_DIR/tests/unit/logs
- name: notify
image: signalwire/drone-notify
pull: always
environment:
SLACK_WEBHOOK_URL:
from_secret: slack_webhook_url
ENV_FILE:
from_secret: notify_env
commands:
- /root/unit-tests-notify.sh
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: scan-build
steps:
- name: scan-build
image: signalwire/freeswitch-public-base
pull: always
environment:
REPOTOKEN:
from_secret: repotoken
commands:
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get -yq install clang-tools-7
- echo "deb http://ftp.de.debian.org/debian testing main" > /etc/apt/sources.list
- apt-get update
- apt-get -y -t testing install libmosquitto-dev
- apt-get -y install libfreeswitch-dev freeswitch-mod-console
- export REPOTOKEN=''
- rm -rf /etc/apt/auth.conf
- export WORK_DIR=$PWD
- echo $WORK_DIR
- ./bootstrap.sh
- ./configure
- mkdir -p ./scan-build
- echo '#!/bin/bash\nscan-build-7 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
- chmod +x scan.sh
- ./scan.sh
- exitstatus=`cat ./scan-build-status.txt`
- echo "*** Exit status is $exitstatus"
- name: notify
image: signalwire/drone-notify
pull: always
environment:
SLACK_WEBHOOK_URL:
from_secret: slack_webhook_url
ENV_FILE:
from_secret: notify_env
commands:
- /root/scan-build-notify.sh
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: signature
hmac: 852b025750fbcd66136d7cb265df78227042a93ec6d9cb9826a765eabd6b43d8
...