Skip to content

Commit

Permalink
Merge branch 'master' into feature/hide-auth-header
Browse files Browse the repository at this point in the history
  • Loading branch information
mangoGoForward authored Jan 14, 2022
2 parents 49b7850 + 4fc743f commit 8440045
Show file tree
Hide file tree
Showing 427 changed files with 27,505 additions and 4,011 deletions.
6 changes: 5 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ github:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/2.10.0:
release/2.11:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/2.10:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
Expand Down
47 changes: 47 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[.gitmodules]
indent_style = tab

[Makefile]
indent_style = tab

[*.{yml,yaml}]
indent_size = 2

[*.go]
indent_style = tab
## ignore ASF license
block_comment_start = /*
block_comment = *
block_comment_end = */

[**go.mod]
indent_style = tab

[t/coredns/db.test.local]
indent_style = unset
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

### Pre-submission checklist:

<!--
Please follow the PR manners:
1. Use Draft if the PR is not ready to be reviewed
2. Test is required for the feat/fix PR, unless you have a good reason
3. Doc is required for the feat PR
4. Use a new commit to resolve review instead of `push -f`
5. If you need to resolve merge conflicts after the PR is reviewed, please merge master but do not rebase
6. Use "request review" to notify the reviewer once you have resolved the review
7. Only reviewer can click "Resolve conversation" to mark the reviewer's review resolved
-->

* [ ] Did you explain what problem does this PR solve? Or what new features have been added?
* [ ] Have you added corresponding test cases?
* [ ] Have you modified the corresponding document?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand All @@ -15,4 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->

# ignore third-party actions
root = true
36 changes: 21 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
branches: [master]
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
Expand All @@ -24,22 +26,26 @@ jobs:
os_name:
- linux_openresty
- linux_openresty_1_17
- linux_openresty_mtls
- linux_tengine

runs-on: ${{ matrix.platform }}
timeout-minutes: 90
env:
SERVER_NAME: ${{ matrix.os_name }}
OPENRESTY_VERSION: default

steps:
- name: Check out code
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
submodules: recursive

- name: Setup Go
uses: actions/[email protected]
with:
go-version: "1.15"

- name: Cache deps
uses: actions/[email protected].6
uses: actions/[email protected].7
env:
cache-name: cache-deps
with:
Expand All @@ -56,13 +62,12 @@ jobs:
- name: Linux launch common services
run: |
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
- name: Create tarball
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
run: |
export VERSION=${{ steps.branch_env.outputs.version }}
make compress-tar
make compress-tar VERSION=${{ steps.branch_env.outputs.version }}
- name: Remove source code
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
Expand All @@ -73,6 +78,14 @@ jobs:
- name: Linux Get dependencies
run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev

- name: Build wasm code
if: startsWith(matrix.os_name, 'linux_openresty')
run: |
export TINYGO_VER=0.20.0
wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VER}/tinygo_${TINYGO_VER}_amd64.deb 2>/dev/null
sudo dpkg -i tinygo_${TINYGO_VER}_amd64.deb
cd t/wasm && find . -type f -name "main.go" | xargs -Ip tinygo build -o p.wasm -scheduler=none -target=wasi p
- name: Linux Before install
run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install

Expand All @@ -92,10 +105,3 @@ jobs:
- name: Linux Script
run: sudo ./ci/${{ matrix.os_name }}_runner.sh script

- name: Publish Artifact
if: ${{ startsWith(github.ref, 'refs/heads/release/') && matrix.os_name == 'linux_openresty' }}
uses: actions/[email protected]
with:
name: ${{ steps.branch_env.outputs.fullname }}
path: ${{ steps.branch_env.outputs.fullname }}
20 changes: 8 additions & 12 deletions .github/workflows/centos7-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
branches: [master]
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
Expand All @@ -18,10 +20,11 @@ jobs:
test_apisix:
name: run ci on centos7
runs-on: ubuntu-latest
timeout-minutes: 90

steps:
- name: Check out code
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
submodules: recursive

Expand All @@ -34,14 +37,14 @@ jobs:
- name: Linux launch common services
run: |
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
- name: Build rpm package
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
run: |
export VERSION=${{ steps.branch_env.outputs.version }}
sudo gem install --no-document fpm
git clone -b v2.2.1 https://github.com/api7/apisix-build-tools.git
git clone -b v2.6.0 https://github.com/api7/apisix-build-tools.git
# move codes under build tool
mkdir ./apisix-build-tools/apisix
Expand All @@ -54,7 +57,7 @@ jobs:
- name: Run centos7 docker and mapping apisix into container
run: |
docker run -itd -v /home/runner/work/apisix/apisix:/apisix --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
docker run -itd -v /home/runner/work/apisix/apisix:/apisix --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash
# docker exec centos7Instance bash -c "cp -r /tmp/apisix ./"
- name: Run other docker containers for test
Expand All @@ -77,10 +80,3 @@ jobs:
- name: Run test cases
run: |
docker exec centos7Instance bash -c "cd apisix && ./ci/centos7-ci.sh run_case"
- name: Publish Artifact
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
uses: actions/[email protected]
with:
name: "rpm"
path: "./apisix-build-tools/output/apisix-${{ steps.branch_env.outputs.version }}-0.el7.x86_64.rpm"
17 changes: 10 additions & 7 deletions .github/workflows/chaos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Chaos Test

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
Expand All @@ -14,17 +14,18 @@ concurrency:
jobs:
chaos-test:
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2.4.0
with:
submodules: recursive

- name: Setup go
uses: actions/[email protected].4
uses: actions/[email protected].5
with:
go-version: "1.16"

- uses: actions/cache@v2
- uses: actions/cache@v2.1.7
with:
path: |
~/.cache/go-build
Expand Down Expand Up @@ -63,9 +64,11 @@ jobs:
kubectl create configmap apisix-gw-config.yaml --from-file=./conf/config.yaml
kubectl apply -f ./kubernetes/deployment.yaml
kubectl apply -f ./kubernetes/service.yaml
kubectl wait pods -l app=apisix-gw --for=condition=Ready --timeout=300s
kubectl wait pods -l app=apisix-gw --for=condition=Ready --timeout=300s \
|| (kubectl logs -l app=apisix-gw && exit 1)
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml
kubectl wait pods -l app=httpbin --for=condition=Ready --timeout=300s
kubectl wait pods -l app=httpbin --for=condition=Ready --timeout=300s \
|| (kubectl logs -l app=httpbin && exit 1)
bash ./t/chaos/utils/setup_chaos_utils.sh port_forward
- name: Deploy Chaos Mesh
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/cli-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CLI Test (master)

on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
branches: [master]
paths-ignore:
- 'docs/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
fail-fast: false
matrix:
job_name:
- linux_apisix_master_luarocks
runs-on: ubuntu-18.04
timeout-minutes: 15
env:
OPENRESTY_VERSION: default

steps:
- name: Check out code
uses: actions/[email protected]
with:
submodules: recursive

- name: Cache deps
uses: actions/[email protected]
env:
cache-name: cache-deps
with:
path: deps
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.job_name }}-${{ hashFiles('rockspec/apisix-master-0.rockspec') }}

- name: Linux launch common services
run: |
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
- name: Linux Get dependencies
run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev

- name: Linux Install
run: |
sudo --preserve-env=OPENRESTY_VERSION \
./ci/${{ matrix.job_name }}_runner.sh do_install
- name: Linux Script
run: sudo ./ci/${{ matrix.job_name }}_runner.sh script
12 changes: 7 additions & 5 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ name: CLI Test

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
Expand All @@ -22,23 +24,23 @@ jobs:
platform:
- ubuntu-18.04
job_name:
- linux_apisix_master_luarocks
- linux_apisix_current_luarocks
- linux_apisix_current_luarocks_in_customed_nginx

runs-on: ${{ matrix.platform }}
timeout-minutes: 15
env:
SERVER_NAME: ${{ matrix.job_name }}
OPENRESTY_VERSION: default

steps:
- name: Check out code
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
submodules: recursive

- name: Cache deps
uses: actions/[email protected].6
uses: actions/[email protected].7
env:
cache-name: cache-deps
with:
Expand Down
Loading

0 comments on commit 8440045

Please sign in to comment.