-
Notifications
You must be signed in to change notification settings - Fork 96
67 lines (59 loc) · 2.13 KB
/
package-apisix-deb-ubuntu20.04.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
name: package apisix deb for ubuntu 20.04(Focal Fossa)
on:
push:
branches: [ master ]
tags:
- "v*"
paths-ignore:
- '*.md'
pull_request:
branches: [ master ]
paths-ignore:
- '*.md'
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
PACKAGE_APISIX_VERSION: 0.0.0
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get install -y make
- name: run apisix packaging
run: |
make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} checkout=master \
image_base=ubuntu image_tag=20.04
- name: install apisix deb into container
run: |
docker build -t apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test --build-arg APISIX_VERSION=${PACKAGE_APISIX_VERSION} -f test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 .
- name: start apisix and test
run: |
docker run -d --rm --name apisix-${PACKAGE_APISIX_VERSION}-deb-test -v $(pwd)/test/apisix/config.yaml:/usr/local/apisix/conf/config.yaml -p 9180:9180 -p 9080:9080 -p 9443:9443 apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test
sleep 20
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/get",
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org:80": 1
}
}
}'
result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get`
if [[ $result_code -ne 200 ]]; then
printf "result_code: %s\n" "$result_code"
exit 125
fi
- name: Publish Artifact
uses: actions/[email protected]
with:
name: apisix_${{ env.PACKAGE_APISIX_VERSION }}-0~ubuntu20.04_amd64.deb
path: output/apisix_${{ env.PACKAGE_APISIX_VERSION }}-0~ubuntu20.04_amd64.deb
retention-days: 5
if-no-files-found: error