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

spacewander 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 adf7042bb chore(ci): apt update before install (#7080)
adf7042bb is described below

commit adf7042bbfb10948c868b35a5ceaf00c0bd68d2c
Author: tzssangglass <[email protected]>
AuthorDate: Thu May 19 17:30:27 2022 +0800

    chore(ci): apt update before install (#7080)
---
 .github/workflows/build.yml                | 11 ++++++++---
 .github/workflows/cli-master.yml           |  3 ---
 .github/workflows/cli.yml                  |  3 ---
 .github/workflows/kubernetes-ci.yml        |  3 +--
 .github/workflows/tars-ci.yml              |  3 +--
 ci/common.sh                               |  5 +++++
 ci/linux_apisix_current_luarocks_runner.sh |  2 ++
 ci/linux_apisix_master_luarocks_runner.sh  |  2 ++
 ci/linux_openresty_common_runner.sh        |  9 ++-------
 9 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ea6eda1e3..a2191c640 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -82,9 +82,6 @@ jobs:
           rm -rf $(ls -1 --ignore=*.tgz --ignore=ci --ignore=t --ignore=utils 
--ignore=.github)
           tar zxvf ${{ steps.branch_env.outputs.fullname }}
 
-      - 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: matrix.os_name == 'linux_openresty'
         run: |
@@ -101,6 +98,14 @@ jobs:
       - name: Linux Before install
         run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install
 
+      - name: Start CI env
+        run: |
+          # generating SSL certificates for Kafka
+          sudo keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 
127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 
-keysize 2048 -storepass changeit
+          # launch deps env
+          make ci-env-up
+          sudo ./ci/linux-ci-init-service.sh
+
       - name: Start Dubbo Backend
         if: matrix.os_name == 'linux_openresty'
         run: |
diff --git a/.github/workflows/cli-master.yml b/.github/workflows/cli-master.yml
index 32c30b273..58a34d8b1 100644
--- a/.github/workflows/cli-master.yml
+++ b/.github/workflows/cli-master.yml
@@ -49,9 +49,6 @@ jobs:
         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 \
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml
index 1dc9e6a9d..342da39b2 100644
--- a/.github/workflows/cli.yml
+++ b/.github/workflows/cli.yml
@@ -54,9 +54,6 @@ jobs:
         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 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 5534cc4f4..66615cf80 100644
--- a/.github/workflows/kubernetes-ci.yml
+++ b/.github/workflows/kubernetes-ci.yml
@@ -77,8 +77,7 @@ jobs:
 
       - name: Linux Install
         run: |
-          sudo apt install -y cpanminus build-essential libncurses5-dev 
libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev
-          sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && 
exit 1)
+          sudo ./ci/${{ matrix.os_name }}_runner.sh before_install
           sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name 
}}_runner.sh do_install
 
       - name: Run test cases
diff --git a/.github/workflows/tars-ci.yml b/.github/workflows/tars-ci.yml
index c939fd240..e85044671 100644
--- a/.github/workflows/tars-ci.yml
+++ b/.github/workflows/tars-ci.yml
@@ -48,8 +48,7 @@ jobs:
 
       - name: Linux Install
         run: |
-          sudo apt install -y cpanminus build-essential libncurses5-dev 
libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev
-          sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && 
exit 1)
+          sudo ./ci/${{ matrix.os_name }}_runner.sh before_install
           sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name 
}}_runner.sh do_install
 
       - name: Run test cases
diff --git a/ci/common.sh b/ci/common.sh
index 6353957ec..fd5575c0f 100644
--- a/ci/common.sh
+++ b/ci/common.sh
@@ -80,3 +80,8 @@ install_nodejs () {
 }
 
 GRPC_SERVER_EXAMPLE_VER=20210819
+
+linux_get_dependencies () {
+    apt update
+    apt install -y cpanminus build-essential libncurses5-dev libreadline-dev 
libssl-dev perl libpcre3 libpcre3-dev libldap2-dev
+}
diff --git a/ci/linux_apisix_current_luarocks_runner.sh 
b/ci/linux_apisix_current_luarocks_runner.sh
index b630c1db9..3989d0df0 100755
--- a/ci/linux_apisix_current_luarocks_runner.sh
+++ b/ci/linux_apisix_current_luarocks_runner.sh
@@ -19,6 +19,8 @@
 . ./ci/common.sh
 
 do_install() {
+    linux_get_dependencies
+
     export_or_prefix
 
     ./utils/linux-install-openresty.sh
diff --git a/ci/linux_apisix_master_luarocks_runner.sh 
b/ci/linux_apisix_master_luarocks_runner.sh
index 75ca91eb2..2ffa94cde 100755
--- a/ci/linux_apisix_master_luarocks_runner.sh
+++ b/ci/linux_apisix_master_luarocks_runner.sh
@@ -19,6 +19,8 @@
 . ./ci/common.sh
 
 do_install() {
+    linux_get_dependencies
+
     export_or_prefix
 
     ./utils/linux-install-openresty.sh
diff --git a/ci/linux_openresty_common_runner.sh 
b/ci/linux_openresty_common_runner.sh
index 0a1fd68e7..16579d527 100755
--- a/ci/linux_openresty_common_runner.sh
+++ b/ci/linux_openresty_common_runner.sh
@@ -19,14 +19,9 @@
 . ./ci/common.sh
 
 before_install() {
-    sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 
1)
-
-    # generating SSL certificates for Kafka
-    keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 
-keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 
2048 -storepass changeit
+    linux_get_dependencies
 
-    # launch deps env
-    make ci-env-up
-    ./ci/linux-ci-init-service.sh
+    sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 
1)
 }
 
 do_install() {

Reply via email to