-
Notifications
You must be signed in to change notification settings - Fork 315
/
Copy pathkong.yaml
90 lines (80 loc) · 2.42 KB
/
kong.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
81
82
83
84
85
86
87
88
89
90
package:
name: kong
version: 3.9.0
epoch: 4
description: "The Kong Gateway - an API Gateway built on Nginx and OpenResty"
copyright:
- license: Apache-2.0
dependencies:
runtime:
- perl
environment:
contents:
packages:
- bash
- bazel<8
- bubblewrap
- build-base
- busybox
- ca-certificates-bundle
- curl
- expat-dev
- jq
- libelf
- lua5.1-mpack
- luajit-dev
- openjdk-21
- openssl
- openssl-dev
- patch
- pcre2-dev
- perl
- pkgconf
- procps
- protobuf-dev
- rust
- valgrind-dev
- yaml-dev
- zlib-dev
pipeline:
- uses: git-checkout
with:
repository: https://github.com/Kong/kong
tag: ${{package.version}}
expected-commit: 0118b3c220681d4f0327540ae1a5e8f271081bf6
- uses: patch
with:
patches: http-archive.patch openssl.patch
- runs: |
# remove openssl directory given we want to build against our system openssl.
rm -r build/openresty/openssl
# Set up environment variables
export PATH=$PATH:$HOME/.cargo/bin
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
# Build Kong with Bazel
bazel build //build:kong --verbose_failures --config release
- runs: |
mkdir -p ${{targets.contextdir}}/usr/local
mkdir -p ${{targets.contextdir}}/usr/bin
mkdir -p ${{targets.destdir}}/etc/kong
mv kong.conf.default ${{targets.destdir}}/etc/kong/
mv build/package/kong.logrotate ${{targets.destdir}}/etc/kong/
mv ./bazel-bin/build/kong-dev/* ${{targets.contextdir}}/usr/local
mv ./bin/kong* ${{targets.destdir}}/usr/local/bin/
cp -R ./kong/include/* ${{targets.destdir}}/usr/local/kong/include/
ln -sf /usr/local/openresty/bin/resty ${{targets.contextdir}}/usr/local/bin/resty
ln -sf /usr/local/openresty/luajit/bin/luajit ${{targets.contextdir}}/usr/local/bin/luajit
ln -sf /usr/local/openresty/luajit/bin/luajit ${{targets.contextdir}}/usr/local/bin/lua
ln -sf /usr/local/openresty/nginx/sbin/nginx ${{targets.contextdir}}/usr/local/bin/nginx
update:
enabled: true
github:
identifier: Kong/kong
use-tag: true
test:
pipeline:
- runs: |
kong version | grep -i ${{package.version}}
kong prepare --v 2>/dev/null | grep -i "preparing nginx"
kong roar | grep -i "Monolith destroyer"
- uses: test/tw/ldd-check