ci: add missing OPENRESTY_PREFIX env variable (#3464)

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This commit is contained in:
罗泽轩 2021-02-01 13:15:53 +08:00 committed by GitHub
parent 5399a31b24
commit 3f0c3ae5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 11 deletions

View File

@ -19,8 +19,10 @@
. ./.travis/common.sh . ./.travis/common.sh
do_install() { do_install() {
export_or_prefix
./utils/linux-install-openresty.sh ./utils/linux-install-openresty.sh
OR_PREFIX=/usr/local/openresty-debug ./utils/linux-install-luarocks.sh ./utils/linux-install-luarocks.sh
./utils/linux-install-etcd-client.sh ./utils/linux-install-etcd-client.sh
} }

View File

@ -19,6 +19,8 @@
. ./.travis/common.sh . ./.travis/common.sh
do_install() { do_install() {
export_or_prefix
./utils/linux-install-openresty.sh ./utils/linux-install-openresty.sh
./utils/linux-install-luarocks.sh ./utils/linux-install-luarocks.sh
./utils/linux-install-etcd-client.sh ./utils/linux-install-etcd-client.sh

View File

@ -16,12 +16,10 @@
# limitations under the License. # limitations under the License.
# #
#!/bin/bash . ./apisix/.travis/common.sh
set -ex
install_dependencies() { install_dependencies() {
export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH export_or_prefix
# install development tools # install development tools
yum install -y wget tar gcc automake autoconf libtool make unzip \ yum install -y wget tar gcc automake autoconf libtool make unzip \
@ -32,7 +30,7 @@ install_dependencies() {
rpm -ivh epel-release-latest-7.noarch.rpm rpm -ivh epel-release-latest-7.noarch.rpm
yum install -y lua-devel yum install -y lua-devel
OR_PREFIX=/usr/local/openresty-debug ./apisix/utils/linux-install-luarocks.sh ./apisix/utils/linux-install-luarocks.sh
# install openresty # install openresty
yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
@ -70,7 +68,8 @@ install_dependencies() {
} }
run_case() { run_case() {
export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin:$PATH export_or_prefix
cd apisix cd apisix
# run test cases # run test cases

View File

@ -16,8 +16,8 @@
# limitations under the License. # limitations under the License.
# #
if [ -z ${OR_PREFIX} ]; then if [ -z ${OPENRESTY_PREFIX} ]; then
OR_PREFIX="/usr/local/openresty" OPENRESTY_PREFIX="/usr/local/openresty"
fi fi
wget https://github.com/luarocks/luarocks/archive/v3.4.0.tar.gz wget https://github.com/luarocks/luarocks/archive/v3.4.0.tar.gz
@ -30,5 +30,5 @@ cd .. || exit
rm -rf luarocks-3.4.0 rm -rf luarocks-3.4.0
mkdir ~/.luarocks || true mkdir ~/.luarocks || true
luarocks config variables.OPENSSL_LIBDIR ${OR_PREFIX}/openssl/lib luarocks config variables.OPENSSL_LIBDIR ${OPENRESTY_PREFIX}/openssl/lib
luarocks config variables.OPENSSL_INCDIR ${OR_PREFIX}/openssl/include luarocks config variables.OPENSSL_INCDIR ${OPENRESTY_PREFIX}/openssl/include