|
9 | 9 | jobs:
|
10 | 10 | build:
|
11 | 11 | runs-on: ubuntu-latest
|
| 12 | + services: |
| 13 | + etcd: |
| 14 | + image: bitnami/etcd:3.4.0 |
| 15 | + ports: |
| 16 | + - 2379:2379 |
| 17 | + - 2380:2380 |
| 18 | + env: |
| 19 | + ALLOW_NONE_AUTHENTICATION: yes |
| 20 | + ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379 |
12 | 21 |
|
13 | 22 | steps:
|
14 | 23 | - uses: actions/checkout@v2
|
|
19 | 28 | sudo gem install --no-document fpm
|
20 | 29 | sudo apt-get install -y rpm
|
21 | 30 |
|
22 |
| - - name: run apisix packaging test |
| 31 | + - name: packaging APISIX |
23 | 32 | run: |
|
24 |
| - make package type=rpm app=apisix version=2.3 checkout=2.3 |
25 |
| - make package type=rpm app=apisix version=2.2 checkout=v2.2 |
| 33 | + make package type=rpm app=apisix version=2.7 checkout=release/2.7 |
26 | 34 | make package type=rpm app=apisix version=master checkout=master
|
| 35 | +
|
| 36 | + - name: run centos7 docker and mapping rpm into container |
| 37 | + run: | |
| 38 | + docker run -itd -v $PWD/output:/output --name centos7Instance --net="host" docker.io/centos:7 /bin/bash |
| 39 | +
|
| 40 | + - name: install dependencies in container |
| 41 | + run: | |
| 42 | + docker exec centos7Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo" |
| 43 | + docker exec centos7Instance bash -c "yum -y install openresty openresty-openssl111-devel" |
| 44 | +
|
| 45 | + - name: install APISIX by rpm in container |
| 46 | + run: | |
| 47 | + docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-master-0.x86_64.rpm" |
| 48 | + docker exec centos7Instance bash -c "apisix start" |
| 49 | +
|
| 50 | + - name: check and ensure APISIX is installed |
| 51 | + run: | |
| 52 | + code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1') |
| 53 | + if [ ! $code -eq 200 ]; then |
| 54 | + echo "failed: failed to install Apache APISIX by rpm" |
| 55 | + exit 1 |
| 56 | + fi |
0 commit comments