You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by tz...@apache.org on 2022/05/19 05:56:22 UTC
[apisix] 01/01: resolve code review
This is an automated email from the ASF dual-hosted git repository.
tzssangglass pushed a commit to branch apt_up
in repository https://gitbox.apache.org/repos/asf/apisix.git
commit 24332bf773915d51f1c8b3e04ceb79a34903f6ad
Author: tzssangglass <tz...@gmail.com>
AuthorDate: Thu May 19 13:56:09 2022 +0800
resolve code review
---
.github/workflows/build.yml | 2 +-
.github/workflows/cli-master.yml | 2 +-
.github/workflows/cli.yml | 2 +-
.github/workflows/kubernetes-ci.yml | 2 +-
.github/workflows/tars-ci.yml | 2 +-
ci/common.sh | 7 -------
ci/linux_openresty_common_runner.sh | 7 +++++++
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3e0f6acd1..133116af8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -83,7 +83,7 @@ jobs:
tar zxvf ${{ steps.branch_env.outputs.fullname }}
- name: Linux Get dependencies
- run: sudo ./ci/common.sh linux_get_dependencies
+ run: sudo ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies
- name: Build wasm code
if: matrix.os_name == 'linux_openresty'
diff --git a/.github/workflows/cli-master.yml b/.github/workflows/cli-master.yml
index 0462c4de3..2a0a64b8a 100644
--- a/.github/workflows/cli-master.yml
+++ b/.github/workflows/cli-master.yml
@@ -50,7 +50,7 @@ jobs:
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
- name: Linux Get dependencies
- run: sudo ./ci/common.sh linux_get_dependencies
+ run: sudo ./ci/linux_openresty_common_runner.sh linux_get_dependencies
- name: Linux Install
run: |
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml
index e0a26613b..e351e62bc 100644
--- a/.github/workflows/cli.yml
+++ b/.github/workflows/cli.yml
@@ -55,7 +55,7 @@ jobs:
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
- name: Linux Get dependencies
- run: sudo ./ci/common.sh linux_get_dependencies
+ run: sudo ./ci/linux_openresty_common_runner.sh linux_get_dependencies
- name: Linux Before install
run: sudo ./ci/${{ matrix.job_name }}_runner.sh before_install
diff --git a/.github/workflows/kubernetes-ci.yml b/.github/workflows/kubernetes-ci.yml
index 94c647a96..216fa6f8d 100644
--- a/.github/workflows/kubernetes-ci.yml
+++ b/.github/workflows/kubernetes-ci.yml
@@ -77,7 +77,7 @@ jobs:
- name: Linux Install
run: |
- sudo ./ci/common.sh linux_get_dependencies
+ sudo ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1)
sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install
diff --git a/.github/workflows/tars-ci.yml b/.github/workflows/tars-ci.yml
index c76d8d0c6..985361643 100644
--- a/.github/workflows/tars-ci.yml
+++ b/.github/workflows/tars-ci.yml
@@ -48,7 +48,7 @@ jobs:
- name: Linux Install
run: |
- sudo ./ci/common.sh linux_get_dependencies
+ sudo ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1)
sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install
diff --git a/ci/common.sh b/ci/common.sh
index 8b0f3b561..fd5575c0f 100644
--- a/ci/common.sh
+++ b/ci/common.sh
@@ -85,10 +85,3 @@ linux_get_dependencies () {
apt update
apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev
}
-
-case_opt=$1
-case $case_opt in
- (linux_get_dependencies)
- linux_get_dependencies
- ;;
-esac
diff --git a/ci/linux_openresty_common_runner.sh b/ci/linux_openresty_common_runner.sh
index 0a1fd68e7..767a9b297 100755
--- a/ci/linux_openresty_common_runner.sh
+++ b/ci/linux_openresty_common_runner.sh
@@ -101,6 +101,10 @@ after_success() {
echo "done"
}
+linux_get_dependencies() {
+ linux_get_dependencies
+}
+
case_opt=$1
shift
@@ -117,4 +121,7 @@ script)
after_success)
after_success "$@"
;;
+linux_get_dependencies)
+ linux_get_dependencies "$@"
+ ;;
esac