File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change 99jobs :
1010 build :
1111 runs-on : ubuntu-latest
12+ env :
13+ DASHBOARD_VERSION : 2.7
14+ services :
15+ etcd :
16+ image : bitnami/etcd:3.4.0
17+ ports :
18+ - 2379:2379
19+ - 2380:2380
20+ env :
21+ ALLOW_NONE_AUTHENTICATION : yes
22+ ETCD_ADVERTISE_CLIENT_URLS : http://0.0.0.0:2379
1223
1324 steps :
1425 - uses : actions/checkout@v2
2132
2233 - name : run apisix-dashboard packaging test
2334 run : |
24- make package type=rpm app=dashboard version=2.4 checkout=v2.4
35+ make package type=rpm app=dashboard version=${DASHBOARD_VERSION} checkout=release/${DASHBOARD_VERSION}
36+
37+ - name : Run centos7 docker and mapping rpm into container
38+ run : |
39+ docker run -itd -v $PWD/output:/apisix-dashboard --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
40+
41+ - name : Install rpm package
42+ run : |
43+ docker exec centos7Instance bash -c "yum install -y /apisix-dashboard/apisix-dashboard-${DASHBOARD_VERSION}-0.x86_64.rpm"
44+ docker logs centos7Instance
45+ docker exec centos7Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &"
46+
47+ - name : Run test cases
48+ run : |
49+ code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000)
50+ if [ ! $code -eq 200 ]; then
51+ echo "failed: failed to install Apache APISIX Dashboard by rpm"
52+ exit 1
53+ fi
54+
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ package-dashboard-rpm:
5959 --build-arg PACKAGE_VERSION=$(version ) \
6060 -f ./dockerfiles/Dockerfile.package.apisix-dashboard .
6161 docker run -d --rm --name output --net=" host" apache/apisix-dashboard-packaged:$(version )
62- docker cp output:/output ${PWD} /output
62+ docker cp output:/output ${PWD}
6363 docker stop output
6464 docker system prune -a -f
6565
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33set -x
4+
5+ mkdir /output
46fpm -f -s dir -t rpm \
57 -n apisix-dashboard \
68 -a " $( uname -i) " \
@@ -9,5 +11,5 @@ fpm -f -s dir -t rpm \
911 --description ' Apache APISIX Dashboard is designed to make it as easy as possible for users to operate Apache APISIX through a frontend interface.' \
1012 --license " ASL 2.0" \
1113 -C /tmp/build/output/apisix/dashboard/ \
12- -p /output \
13- --url ' https://github.com/apache/apisix-dashboard'
14+ -p /output/ \
15+ --url ' https://github.com/apache/apisix-dashboard'
You can’t perform that action at this time.
0 commit comments