Skip to content

package apisix deb for ubuntu 20.04(Focal Fossa) #2350

package apisix deb for ubuntu 20.04(Focal Fossa)

package apisix deb for ubuntu 20.04(Focal Fossa) #2350

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
APISIX_VERSION: master
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get install -y make
- name: run apisix packaging
run: |
wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements
make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} runtime_version=${APISIX_RUNTIME} checkout=${APISIX_VERSION} 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 --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
docker ps -a
docker logs apisix-${PACKAGE_APISIX_VERSION}-deb-test
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