Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into uri_args
Browse files Browse the repository at this point in the history
  • Loading branch information
boekkooi-lengoo committed Jan 11, 2024
2 parents 935a300 + 21599ac commit 45ee4a2
Show file tree
Hide file tree
Showing 138 changed files with 5,162 additions and 651 deletions.
4 changes: 4 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ github:
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.8:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.7:
required_pull_request_reviews:
require_code_owner_reviews: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- ubuntu-20.04
os_name:
- linux_openresty
events_module:
- lua-resty-worker-events
- lua-resty-events
test_dir:
- t/plugin/[a-k]*
- t/plugin/[l-z]*
Expand Down Expand Up @@ -138,6 +141,7 @@ jobs:
- name: Start Dubbo Backend
if: matrix.os_name == 'linux_openresty' && (steps.test_env.outputs.type == 'plugin' || steps.test_env.outputs.type == 'last')
run: |
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
Expand Down Expand Up @@ -169,6 +173,7 @@ jobs:
- name: Linux Script
env:
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
run: sudo -E ./ci/${{ matrix.os_name }}_runner.sh script

- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/centos7-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
strategy:
fail-fast: false
matrix:
events_module:
- lua-resty-worker-events
- lua-resty-events
test_dir:
- t/plugin/[a-k]*
- t/plugin/[l-z]*
Expand Down Expand Up @@ -96,6 +99,7 @@ jobs:
- name: Start Dubbo Backend
run: |
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
Expand All @@ -111,8 +115,9 @@ jobs:
- name: Run centos7 docker and mapping apisix into container
env:
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
run: |
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --env TEST_EVENTS_MODULE="$TEST_EVENTS_MODULE" --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: Cache images
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/cli-master.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
export_or_prefix
export OPENRESTY_VERSION=default
./ci/linux-install-openresty.sh
sudo -E ./ci/linux-install-openresty.sh
./utils/linux-install-luarocks.sh
sudo luarocks install luacheck
sudo -E luarocks install luacheck
- name: Script
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: 🚀 Use Node.js
uses: actions/setup-node@v4.0.0
uses: actions/setup-node@v4.0.1
with:
node-version: "12.x"
- run: npm install -g markdownlint-cli@0.25.0
Expand Down
34 changes: 3 additions & 31 deletions .github/workflows/fips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
env:
SERVER_NAME: ${{ matrix.os_name }}
OPENRESTY_VERSION: default
ENABLE_FIPS: true

steps:
- name: Check out code
Expand All @@ -54,28 +55,6 @@ jobs:
path: deps
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-${{ hashFiles('apisix-master-0.rockspec') }}

- name: Cache openssl-3.0 compilation
id: cache-openssl
uses: actions/cache@v3
env:
cache-name: cache-openssl
with:
path: ~/openssl-3.0
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}

- name: set openssl prefix
id: set_openssl_prefix
shell: bash
run: |
echo "openssl3_prefix=$HOME" >>$GITHUB_OUTPUT
- name: Toggle openssl compile
id: test_ssl_env
shell: bash
if: steps.cache-openssl.outputs.cache-hit != 'true'
run: |
echo "openssl3=yes" >>$GITHUB_OUTPUT
- name: Extract test type
shell: bash
id: test_env
Expand Down Expand Up @@ -139,16 +118,9 @@ jobs:
run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install

- name: Linux Install
env:
COMPILE_OPENSSL3: ${{ steps.test_ssl_env.outputs.openssl3 }}
OPENSSL3_PREFIX: ${{ steps.set_openssl_prefix.outputs.openssl3_prefix }}
USE_OPENSSL3: yes
run: |
sudo --preserve-env=OPENRESTY_VERSION \
--preserve-env=COMPILE_OPENSSL3 \
--preserve-env=OPENSSL3_PREFIX \
--preserve-env=USE_OPENSSL3 \
./ci/${{ matrix.os_name }}_runner.sh do_install
sudo --preserve-env=ENABLE_FIPS \
./ci/${{ matrix.os_name }}_runner.sh do_install
- name: Linux Script
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gm-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
- name: Start Dubbo Backend
if: steps.test_env.outputs.type == 'plugin'
run: |
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Nodejs env
uses: actions/setup-node@v4.0.0
uses: actions/setup-node@v4.0.1
with:
node-version: '12'

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/redhat-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
strategy:
fail-fast: false
matrix:
events_module:
- lua-resty-worker-events
- lua-resty-events
test_dir:
- t/plugin/[a-k]*
- t/plugin/[l-z]*
Expand Down Expand Up @@ -92,6 +95,7 @@ jobs:
- name: Start Dubbo Backend
run: |
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
Expand All @@ -107,8 +111,9 @@ jobs:
- name: Run redhat docker and mapping apisix into container
env:
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
TEST_EVENTS_MODULE: ${{ matrix.events_module }}
run: |
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --name ubiInstance --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --env TEST_EVENTS_MODULE="$TEST_EVENTS_MODULE" --name ubiInstance --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
- name: Cache images
id: cache-images
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/source-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Source Code Install

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

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

permissions:
contents: read

jobs:
install-on-multi-platform:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-20.04
os_platform:
- centos7
- ubuntu
- redhat
services:
etcd:
image: bitnami/etcd:3.5.4
ports:
- 2379:2379
- 2380:2380
env:
ALLOW_NONE_AUTHENTICATION: yes
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
httpbin:
image: kennethreitz/httpbin
ports:
- 8088:80

runs-on: ${{ matrix.platform }}
timeout-minutes: 30

steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache deps
uses: actions/cache@v3
env:
cache-name: cache-deps
with:
path: deps
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_platform }}-${{ hashFiles('apisix-master-0.rockspec') }}

- name: Install and start apisix on ${{ matrix.os_platform }}
env:
INSTALL_PLATFORM: ${{ matrix.os_platform }}
run: |
if [[ $INSTALL_PLATFORM == "ubuntu" ]]; then
sudo apt-get update
sudo apt-get install -y git sudo make
make deps
sudo make install
apisix start
elif [[ $INSTALL_PLATFORM == "redhat" ]]; then
docker run -itd -v ${{ github.workspace }}:/apisix --name ubi8 --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
docker exec ubi8 bash -c "yum install -y git sudo make"
docker exec ubi8 bash -c "cd apisix && make deps"
docker exec ubi8 bash -c "cd apisix && make install"
docker exec ubi8 bash -c "cd apisix && apisix start"
elif [[ $INSTALL_PLATFORM == "centos7" ]]; then
docker run -itd -v ${{ github.workspace }}:/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 "yum install -y git sudo make"
docker exec centos7Instance bash -c "cd apisix && make deps"
docker exec centos7Instance bash -c "cd apisix && make install"
docker exec centos7Instance bash -c "cd apisix && apisix start"
fi
sleep 6
- name: Test apisix
run: |
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/get",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:8088": 1
}
}
}'
result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get`
if [[ $result_code -ne 200 ]]; then
printf "result_code: %s\n" "$result_code"
echo "===============access.log==============="
cat logs/access.log
echo "===============error.log==============="
cat logs/error.log
exit 125
fi
- name: Check error log
run: |
if grep -q '\[error\]' logs/error.log; then
echo "=====found error log====="
cat /usr/local/apisix/logs/error.log
exit 125
fi
2 changes: 1 addition & 1 deletion .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

APISIX_PACKAGE_NAME=apisix

APISIX_RUNTIME=1.0.1
APISIX_RUNTIME=1.1.1
Loading

0 comments on commit 45ee4a2

Please sign in to comment.