This is an automated email from the ASF dual-hosted git repository.

monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 455804771 feat: new ci base on apisix-runtime with specified version 
(#10415)
455804771 is described below

commit 455804771124c15ff909e49ad8dfdd961f0e4a88
Author: Sn0rt <[email protected]>
AuthorDate: Wed Nov 1 11:23:02 2023 +0800

    feat: new ci base on apisix-runtime with specified version (#10415)
---
 .github/workflows/centos7-ci.yml | 10 +++++++++-
 .github/workflows/redhat-ci.yaml | 10 +++++++++-
 .requirements                    | 20 ++++++++++++++++++++
 ci/centos7-ci.sh                 | 13 ++++++++++++-
 ci/common.sh                     | 14 +++++++++-----
 ci/linux-install-openresty.sh    | 28 ++++++++++------------------
 ci/performance_test.sh           |  2 +-
 ci/redhat-ci.sh                  | 13 +++++++++++--
 8 files changed, 81 insertions(+), 29 deletions(-)

diff --git a/.github/workflows/centos7-ci.yml b/.github/workflows/centos7-ci.yml
index 2be0c39cb..d2c447ef3 100644
--- a/.github/workflows/centos7-ci.yml
+++ b/.github/workflows/centos7-ci.yml
@@ -31,7 +31,7 @@ jobs:
           - t/plugin/[a-k]*
           - t/plugin/[l-z]*
           - t/admin t/cli t/config-center-yaml t/control t/core t/debug 
t/discovery t/error_page t/misc
-          - t/node t/pubsub t/router t/script t/secret t/stream-node t/utils 
t/wasm t/xds-library
+          - t/node t/pubsub t/router t/script t/secret t/stream-node t/utils 
t/xds-library
 
     steps:
     - name: Check out code
@@ -94,6 +94,14 @@ jobs:
         cd ..
         rm -rf $(ls -1 --ignore=apisix-build-tools --ignore=t --ignore=utils 
--ignore=ci --ignore=Makefile --ignore=rockspec)
 
+    - name: Start Dubbo Backend
+      run: |
+        sudo apt install -y maven
+        cd t/lib/dubbo-backend
+        mvn package
+        cd dubbo-backend-provider/target
+        java -Djava.net.preferIPv4Stack=true -jar 
dubbo-demo-provider.one-jar.jar > /tmp/java.log &
+
     - name: Build xDS library
       if: steps.test_env.outputs.type == 'last'
       run: |
diff --git a/.github/workflows/redhat-ci.yaml b/.github/workflows/redhat-ci.yaml
index 9bd8d39e3..cc9d819be 100644
--- a/.github/workflows/redhat-ci.yaml
+++ b/.github/workflows/redhat-ci.yaml
@@ -27,7 +27,7 @@ jobs:
           - t/plugin/[a-k]*
           - t/plugin/[l-z]*
           - t/admin t/cli t/config-center-yaml t/control t/core t/debug 
t/discovery t/error_page t/misc
-          - t/node t/pubsub t/router t/script t/secret t/stream-node t/utils 
t/wasm t/xds-library
+          - t/node t/pubsub t/router t/script t/secret t/stream-node t/utils 
t/xds-library
 
     steps:
     - name: Check out code
@@ -90,6 +90,14 @@ jobs:
         cd ..
         rm -rf $(ls -1 --ignore=apisix-build-tools --ignore=t --ignore=utils 
--ignore=ci --ignore=Makefile --ignore=rockspec)
 
+    - name: Start Dubbo Backend
+      run: |
+        sudo apt install -y maven
+        cd t/lib/dubbo-backend
+        mvn package
+        cd dubbo-backend-provider/target
+        java -Djava.net.preferIPv4Stack=true -jar 
dubbo-demo-provider.one-jar.jar > /tmp/java.log &
+
     - name: Build xDS library
       if: steps.test_env.outputs.type == 'last'
       run: |
diff --git a/.requirements b/.requirements
new file mode 100644
index 000000000..3155762a7
--- /dev/null
+++ b/.requirements
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+APISIX_PACKAGE_NAME=apisix
+
+APISIX_RUNTIME=1.0.1
diff --git a/ci/centos7-ci.sh b/ci/centos7-ci.sh
index cf506ef54..beb3750a1 100755
--- a/ci/centos7-ci.sh
+++ b/ci/centos7-ci.sh
@@ -19,6 +19,7 @@
 . ./ci/common.sh
 
 install_dependencies() {
+    export_version_info
     export_or_prefix
 
     # install build & runtime deps
@@ -31,9 +32,19 @@ install_dependencies() {
     yum install -y libnghttp2-devel
     install_curl
 
+    yum -y install centos-release-scl
+    yum -y install devtoolset-9 patch wget git make sudo
+    set +eu
+    source scl_source enable devtoolset-9
+    set -eu
+
     # install openresty to make apisix's rpm test work
     yum install -y yum-utils && yum-config-manager --add-repo 
https://openresty.org/package/centos/openresty.repo
-    yum install -y openresty-1.21.4.2 openresty-debug-1.21.4.2 
openresty-openssl111-debug-devel pcre pcre-devel
+    wget 
"https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime-debug-centos7.sh";
+    wget 
"https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime.sh";
+    chmod +x build-apisix-runtime-debug-centos7.sh
+    chmod +x build-apisix-runtime.sh
+    ./build-apisix-runtime-debug-centos7.sh
 
     # install luarocks
     ./utils/linux-install-luarocks.sh
diff --git a/ci/common.sh b/ci/common.sh
index 0aa9f9e85..087c72956 100644
--- a/ci/common.sh
+++ b/ci/common.sh
@@ -17,9 +17,13 @@
 
 set -ex
 
+export_version_info() {
+    source ./.requirements
+}
+
 export_or_prefix() {
-    export OPENRESTY_PREFIX="/usr/local/openresty-debug"
-    export 
APISIX_MAIN="https://raw.githubusercontent.com/apache/incubator-apisix/master/rockspec/apisix-master-0.rockspec";
+    export OPENRESTY_PREFIX="/usr/local/openresty"
+    export 
APISIX_MAIN="https://raw.githubusercontent.com/apache/apisix/master/rockspec/apisix-master-0.rockspec";
     export 
PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/luajit/bin:$OPENRESTY_PREFIX/bin:$PATH
     export OPENSSL111_BIN=$OPENRESTY_PREFIX/openssl111/bin/openssl
 }
@@ -59,8 +63,8 @@ rerun_flaky_tests() {
 
 install_curl () {
     CURL_VERSION="7.88.0"
-    wget https://curl.se/download/curl-${CURL_VERSION}.tar.gz
-    tar -xzvf curl-${CURL_VERSION}.tar.gz
+    wget -q https://curl.se/download/curl-${CURL_VERSION}.tar.gz
+    tar -xzf curl-${CURL_VERSION}.tar.gz
     cd curl-${CURL_VERSION}
     ./configure --prefix=/usr/local --with-openssl --with-nghttp2
     make
@@ -90,7 +94,7 @@ install_nodejs () {
     NODEJS_PREFIX="/usr/local/node"
     NODEJS_VERSION="16.13.1"
     wget -q 
https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.xz
-    tar -xvf node-v${NODEJS_VERSION}-linux-x64.tar.xz
+    tar -xf node-v${NODEJS_VERSION}-linux-x64.tar.xz
     rm -f /usr/local/bin/node
     rm -f /usr/local/bin/npm
     mv node-v${NODEJS_VERSION}-linux-x64 ${NODEJS_PREFIX}
diff --git a/ci/linux-install-openresty.sh b/ci/linux-install-openresty.sh
index 8d4b6f872..59807fbc8 100755
--- a/ci/linux-install-openresty.sh
+++ b/ci/linux-install-openresty.sh
@@ -17,6 +17,10 @@
 #
 set -euo pipefail
 
+source ./ci/common.sh
+
+export_version_info
+
 ARCH=${ARCH:-`(uname -m | tr '[:upper:]' '[:lower:]')`}
 arch_path=""
 if [[ $ARCH == "arm64" ]] || [[ $ARCH == "aarch64" ]]; then
@@ -24,13 +28,14 @@ if [[ $ARCH == "arm64" ]] || [[ $ARCH == "aarch64" ]]; then
 fi
 
 wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
+wget -qO - http://repos.apiseven.com/pubkey.gpg | sudo apt-key add -
 sudo apt-get -y update --fix-missing
 sudo apt-get -y install software-properties-common
 sudo add-apt-repository -y "deb 
https://openresty.org/package/${arch_path}ubuntu $(lsb_release -sc) main"
+sudo add-apt-repository -y "deb 
http://repos.apiseven.com/packages/${arch_path}debian bullseye main"
 
 sudo apt-get update
-
-abt_branch=${abt_branch:="master"}
+sudo apt-get install -y openresty-openssl111 openresty-openssl111-dev 
libldap2-dev openresty-pcre openresty-zlib
 
 COMPILE_OPENSSL3=${COMPILE_OPENSSL3-no}
 USE_OPENSSL3=${USE_OPENSSL3-no}
@@ -73,21 +78,8 @@ if [ "$OPENRESTY_VERSION" == "source" ]; then
         export cc_opt="-DNGX_LUA_ABORT_AT_PANIC -I${zlib_prefix}/include 
-I${pcre_prefix}/include -I${openssl_prefix}/include"
         export ld_opt="-L${zlib_prefix}/lib -L${pcre_prefix}/lib 
-L${openssl_prefix}/lib64 
-Wl,-rpath,${zlib_prefix}/lib:${pcre_prefix}/lib:${openssl_prefix}/lib64"
     fi
-
-    cd ..
-    wget -q 
https://raw.githubusercontent.com/api7/apisix-build-tools/$abt_branch/build-apisix-base.sh
-    chmod +x build-apisix-base.sh
-    ./build-apisix-base.sh latest
-
-    sudo apt-get install -y openresty-openssl111 
openresty-openssl111-debug-dev libldap2-dev openresty-pcre openresty-zlib
-
-    exit 0
-fi
-
-if [ "$OPENRESTY_VERSION" == "default" ]; then
-    openresty='openresty-debug'
-else
-    openresty="openresty-debug=$OPENRESTY_VERSION*"
 fi
 
-sudo apt-get install "$openresty" openresty-openssl111-debug-dev libldap2-dev
+wget 
"https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime.sh";
+chmod +x build-apisix-runtime.sh
+./build-apisix-runtime.sh latest
diff --git a/ci/performance_test.sh b/ci/performance_test.sh
index 94966b5d6..0ec2f1e20 100755
--- a/ci/performance_test.sh
+++ b/ci/performance_test.sh
@@ -78,7 +78,7 @@ run_performance_test() {
     pip3 install -r t/perf/requirements.txt --user
 
     #openresty-debug
-    export OPENRESTY_PREFIX="/usr/local/openresty-debug"
+    export OPENRESTY_PREFIX="/usr/local/openresty"
     export 
PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/bin:$OPENRESTY_PREFIX/luajit/bin:$PATH
 
     mkdir output
diff --git a/ci/redhat-ci.sh b/ci/redhat-ci.sh
index ff867fb71..d40ccbfeb 100755
--- a/ci/redhat-ci.sh
+++ b/ci/redhat-ci.sh
@@ -18,6 +18,7 @@
 
 . ./ci/common.sh
 install_dependencies() {
+    export_version_info
     export_or_prefix
 
     # install build & runtime deps
@@ -30,9 +31,17 @@ install_dependencies() {
     yum install -y libnghttp2-devel
     install_curl
 
-    # install openresty to make apisix's rpm test work
+    # install apisix-runtime to make apisix's rpm test work
     yum install -y yum-utils && yum-config-manager --add-repo 
https://openresty.org/package/centos/openresty.repo
-    yum install -y openresty-1.21.4.2 openresty-debug-1.21.4.2 
openresty-openssl111-debug-devel pcre pcre-devel xz
+    rpm --import https://repos.apiseven.com/KEYS
+    yum install -y openresty-openssl111 openresty-openssl111-devel pcre pcre 
pcre-devel xz
+    yum -y install 
https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
+
+    wget 
"https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime-debug-centos7.sh";
+    wget 
"https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime.sh";
+    chmod +x build-apisix-runtime.sh
+    chmod +x build-apisix-runtime-debug-centos7.sh
+    ./build-apisix-runtime-debug-centos7.sh
 
     # install luarocks
     ./utils/linux-install-luarocks.sh

Reply via email to