Skip to content

Commit

Permalink
Merge branch 'master' into remove-listen-host
Browse files Browse the repository at this point in the history
  • Loading branch information
johzchen committed Apr 19, 2021
2 parents a0f137a + 5d9cd3f commit 4a2b248
Show file tree
Hide file tree
Showing 70 changed files with 750 additions and 577 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/auto-build-rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Auto Build RPM

on:
push:
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
pull_request:
branches: [master]
paths-ignore:
- 'docs/**'

jobs:
auto_build_rpm:
name: auto build rpm package
runs-on: ubuntu-latest

services:
etcd:
image: bitnami/etcd:3.4.0
ports:
- 2379:2379
- 2380:2380
env:
ALLOW_NONE_AUTHENTICATION: yes
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Extract branch name
id: branch_env
shell: bash
run: |
echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
- name: Build rpm package
run: |
export VERSION=${{ steps.branch_env.outputs.version }}
sudo gem install --no-document fpm
git clone https://github.com/api7/apisix-build-tools.git
cd apisix-build-tools
export checkout=master
if [ "$VERSION" != "merge" && "$VERSION" != "master" ];then
export checkout=release/${VERSION}
fi
make package type=rpm app=dashboard version=${VERSION} checkout=${checkout}
- name: Run centos7 docker and mapping apisix into container
run: |
docker run -itd -v $PWD:/apisix-dashboard --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
- name: Install rpm package
run: |
export VERSION=${{ steps.branch_env.outputs.version }}
docker exec centos7Instance bash -c "cd apisix-dashboard && yum install -y ./apisix-build-tools/output/apisix-dashboard-${VERSION}-0.x86_64.rpm"
docker logs centos7Instance
# Dependencies are attached with rpm, so revert `make deps`
docker exec centos7Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &"
- name: Run test cases
run: |
api/test/shell/manager_smoking.sh -s true
- name: Publish Artifact
uses: actions/upload-artifact@v2.2.2
with:
name: "rpm"
path: "./apisix-build-tools/output/apisix-dashboard-${{ steps.branch_env.outputs.version }}-0.x86_64.rpm"
1 change: 1 addition & 0 deletions .github/workflows/backend-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
docker-compose up -d
sleep 5
docker logs docker_managerapi_1
docker logs docker_apisix_1
- name: run test
working-directory: ./api/test/e2e
Expand Down
Loading

0 comments on commit 4a2b248

Please sign in to comment.