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

membphis 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 2e8f738  ci: retry make deps (#4024)
2e8f738 is described below

commit 2e8f738ded52865b0e4dec5458d99b3323fffb21
Author: 罗泽轩 <[email protected]>
AuthorDate: Sun Apr 11 18:59:19 2021 +0800

    ci: retry make deps (#4024)
    
    cool pr!!
---
 ci/common.sh                               | 8 +++++++-
 ci/linux_apisix_current_luarocks_runner.sh | 9 ++++++++-
 utils/centos7-ci.sh                        | 8 +++++++-
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/ci/common.sh b/ci/common.sh
index 62760a6..11829fd 100644
--- a/ci/common.sh
+++ b/ci/common.sh
@@ -26,7 +26,13 @@ export_or_prefix() {
 create_lua_deps() {
     echo "Create lua deps cache"
 
-    make deps
+    for (( i = 0; i < 10; i++ )); do
+        if [[ "$i" -eq 10 ]]; then
+            echo "failed to make deps in time"
+            exit 1
+        fi
+        make deps && break
+    done
     # maybe reopen this feature later
     # luarocks install luacov-coveralls --tree=deps --local > build.log 2>&1 
|| (cat build.log && exit 1)
 
diff --git a/ci/linux_apisix_current_luarocks_runner.sh 
b/ci/linux_apisix_current_luarocks_runner.sh
index e055c4c..5989c66 100755
--- a/ci/linux_apisix_current_luarocks_runner.sh
+++ b/ci/linux_apisix_current_luarocks_runner.sh
@@ -33,7 +33,14 @@ script() {
     sudo rm -rf /usr/local/apisix
 
     # install APISIX with local version
-    sudo luarocks install rockspec/apisix-master-0.rockspec --only-deps  > 
build.log 2>&1 || (cat build.log && exit 1)
+    for (( i = 0; i < 10; i++ )); do
+        if [[ "$i" -eq 10 ]]; then
+            echo "failed to install in time"
+            cat build.log && exit 1
+            exit 1
+        fi
+        sudo luarocks install rockspec/apisix-master-0.rockspec --only-deps  > 
build.log 2>&1 && break
+    done
     sudo luarocks make rockspec/apisix-master-0.rockspec > build.log 2>&1 || 
(cat build.log && exit 1)
 
     mkdir cli_tmp && cd cli_tmp
diff --git a/utils/centos7-ci.sh b/utils/centos7-ci.sh
index 32ec963..8a7fabc 100755
--- a/utils/centos7-ci.sh
+++ b/utils/centos7-ci.sh
@@ -56,7 +56,13 @@ install_dependencies() {
 
     # install dependencies
     git clone https://github.com/iresty/test-nginx.git test-nginx
-    make deps
+    for (( i = 0; i < 10; i++ )); do
+        if [[ "$i" -eq 10 ]]; then
+            echo "failed to make deps in time"
+            exit 1
+        fi
+        make deps && break
+    done
 }
 
 run_case() {

Reply via email to