-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
34 lines (31 loc) · 1013 Bytes
/
.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
---
kind: pipeline
type: docker
name: default
steps:
- name: frontend
network_mode: host
image: node
commands:
- cd web
- npm install -g pnpm
- npx browserslist@latest --update-db
- pnpm install
- pnpm build
- name: backend
network_mode: host
image: golang:1.18-alpine
commands:
- apk add -U --no-cache build-base wget ca-certificates tzdata flex bison linux-headers
- export BUILDDIR=$(pwd)
- mkdir /build && cd /build
- wget https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz
- tar xvf libpcap-1.10.1.tar.gz && cd libpcap-1.10.1 && ./configure --with-pcap=linux && make
- cd /drone/src/api
- go mod tidy
- CGO_ENABLED=1 LD_LIBRARY_PATH="-L/build/libpcap-1.10.1" CGO_LDFLAGS="-L/build/libpcap-1.10.1" CGO_CPPFLAGS="-I/build/libpcap-1.10.1" go build -ldflags '-linkmode external -extldflags -static' --tags "linux sqlite_foreign_keys=1" ./
trigger:
event:
- custom
- push
- pull_request