Skip to content

Commit

Permalink
Merge branch 'master' into addMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxiran committed Sep 8, 2021
2 parents 6c04226 + 98fe38a commit ed85d12
Show file tree
Hide file tree
Showing 94 changed files with 2,270 additions and 609 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/auto-build-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ jobs:
run: |
export VERSION=${{ steps.branch_env.outputs.version }}
sudo gem install --no-document fpm
git clone -b v2.0.0 https://github.com/api7/apisix-build-tools.git
git clone -b v2.1.0 https://github.com/api7/apisix-build-tools.git
# move codes under build tool
mkdir ./apisix-build-tools/apisix-dashboard
for dir in `ls|grep -v "^apisix-build-tools$"`;do cp -r $dir ./apisix-build-tools/apisix-dashboard/;done
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} image_base=centos image_tag=7
make package type=rpm app=dashboard version=${VERSION} checkout=${checkout} image_base=centos image_tag=7 local_code_path=./apisix-dashboard
- name: Run centos7 docker and mapping apisix into container
run: |
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/backend-cli-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'web/**'
paths:
- 'api/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- 'web/**'
paths:
- 'api/**'

jobs:
run-test:
runs-on: ubuntu-latest

strategy:
matrix:
etcd: [3.4.14]
services:
etcd:
image: bitnami/etcd:3.4.13
image: bitnami/etcd:${{ matrix.etcd }}
ports:
- 2379:2379
- 2380:2380
Expand All @@ -30,11 +30,20 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: cache etcd
id: cache-etcd
uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/api/etcd-v${{ matrix.etcd }}-linux-amd64
key: etcd-v${{ matrix.etcd }}-linux-amd64

- name: download etcd
if: ${{ steps.cache-etcd.outputs.cache-hit != 'true' }}
working-directory: ./api
run: |
wget https://github.com/etcd-io/etcd/releases/download/v3.4.14/etcd-v3.4.14-linux-amd64.tar.gz
tar zxvf etcd-v3.4.14-linux-amd64.tar.gz
wget https://github.com/etcd-io/etcd/releases/download/v${{ matrix.etcd }}/etcd-v${{ matrix.etcd }}-linux-amd64.tar.gz
tar zxvf etcd-v${{ matrix.etcd }}-linux-amd64.tar.gz
- name: run test
working-directory: ./api
Expand Down
70 changes: 62 additions & 8 deletions .github/workflows/backend-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'web/**'
paths:
- 'api/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- 'web/**'
paths:
- 'api/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
Expand All @@ -26,11 +24,30 @@ jobs:
- uses: actions/checkout@v2

- name: setup go
uses: actions/setup-go@v2.1.3
uses: actions/setup-go@v2.1.4
with:
go-version: "1.13"
submodules: recursive

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: docker/setup-buildx-action@v1

- uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-apisixdashboard-
${{ runner.os }}-buildx-
- name: Modify conf.yaml
run: |
sed -i 's/127.0.0.1:2379/172.16.238.10:2379/' ./api/conf/conf.yaml
Expand All @@ -44,6 +61,15 @@ jobs:
run: |
curl -o Dockerfile-apisix https://raw.githubusercontent.com/apache/apisix-docker/master/alpine/Dockerfile
- name: build docker images
working-directory: ./api/test/docker
continue-on-error: true
run: |
docker buildx bake --load \
-f docker-compose.yaml \
--set *.cache-from=type=local,src=/tmp/.buildx-cache \
--set *.cache-to=type=local,dest=/tmp/.buildx-cache
- name: run docker compose
working-directory: ./api/test/docker
run: |
Expand All @@ -67,6 +93,15 @@ jobs:
docker-compose down
sleep 10
- name: re-build docker images
working-directory: ./api/test/docker
continue-on-error: true
run: |
docker buildx bake --load \
-f docker-compose.yaml \
--set *.cache-from=type=local,src=/tmp/.buildx-cache \
--set *.cache-to=type=local,dest=/tmp/.buildx-cache
- name: re-run docker compose
working-directory: ./api/test/docker
run: |
Expand Down Expand Up @@ -95,10 +130,20 @@ jobs:
- uses: actions/checkout@v2

- name: setup go
uses: actions/setup-go@v2.1.3
uses: actions/setup-go@v2.1.4
with:
go-version: "1.13"

- uses: docker/setup-buildx-action@v1

- uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-apisixdashboard-
${{ runner.os }}-buildx-
- name: Modify conf.yaml Configure for use by the manage-api cluster
run: |
sed -i 's/127.0.0.1:2379/172.16.238.10:2379/' ./api/conf/conf.yaml
Expand All @@ -111,6 +156,15 @@ jobs:
run: |
curl -o Dockerfile-apisix https://raw.githubusercontent.com/apache/apisix-docker/master/alpine/Dockerfile
- name: build docker images
working-directory: ./api/test/docker
continue-on-error: true
run: |
docker buildx bake --load \
-f docker-compose.yaml \
--set *.cache-from=type=local,src=/tmp/.buildx-cache \
--set *.cache-to=type=local,dest=/tmp/.buildx-cache
- name: run docker compose
working-directory: ./api/test/docker
run: |
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/backend-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'web/**'
paths:
- 'api/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- 'web/**'
paths:
- 'api/**'

jobs:
run-test:
Expand All @@ -31,10 +29,19 @@ jobs:
- uses: actions/checkout@v2

- name: setup go
uses: actions/setup-go@v2.1.3
uses: actions/setup-go@v2.1.4
with:
go-version: "1.13"

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: run test
run: |
make api-test
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/deploy-with-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ jobs:
with:
submodules: recursive

- uses: docker/setup-buildx-action@v1

- uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-apisixdashboard-
${{ runner.os }}-buildx-
- uses: Azure/docker-login@v1
if: ${{ github.event_name == 'push' }}
with:
Expand All @@ -33,8 +43,13 @@ jobs:
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build Docker Image
run: |
docker build -t dashboard:ci . --build-arg APISIX_DASHBOARD_VERSION=master
uses: docker/build-push-action@v2
with:
load: true
tags: dashboard:ci
context: .
build-args: |
APISIX_DASHBOARD_VERSION=master
- name: Modify Config
run: |
Expand All @@ -45,6 +60,13 @@ jobs:
# So we need to configure `listen.host` so that it can be accessed outside docker
sed -i '/port: 9000/i\ host: 0.0.0.0' ./api/conf/conf.yaml
- name: build docker images
working-directory: ./api/test/docker-deploy
continue-on-error: true
run: |
docker buildx bake --load \
-f docker-compose.yaml
- name: Run Docker Compose
working-directory: ./api/test/docker-deploy
run: |
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/frontend-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,29 @@ jobs:
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: 'yarn'
cache-dependency-path: web/yarn.lock

- name: Setup golang environment
uses: actions/setup-go@v2.1.3
uses: actions/setup-go@v2.1.4
with:
go-version: '1.13'

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Start manager-api
working-directory: ./api
run: |
sed -i 's@# - dubbo-proxy@- dubbo-proxy@' ./conf/conf.yaml
nohup go run ./main.go &
- name: Cache node_modules
uses: actions/cache@v2.1.6
id: yarn-cache
with:
path: '*/node_modules'
key: '${{ runner.os }}-yarn-cache0-${{ hashFiles(''**/yarn.lock'') }}'
restore-keys: |
${{ runner.os }}-yarn-cache0
- name: Cache Cypress binary
uses: actions/cache@v2.1.6
id: cypress-binary-cache
Expand All @@ -76,7 +78,6 @@ jobs:
cypress-${{ runner.os }}-cypress-cache0
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: Start frontend then test
Expand All @@ -97,6 +98,6 @@ jobs:
with:
name: cypress-report
path: |
web/cypress/videos
web/cypress/screenshots
web/cypress/videos
web/cypress/screenshots
retention-days: 5
Loading

0 comments on commit ed85d12

Please sign in to comment.