diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /scripts/utils.sh | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh index 897f8d5a8b8..f81e5c8982a 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -1,25 +1,25 @@ function retry() { + if eval "$@"; then + return 0 + fi + + for i in 2 1; do + sleep 3s + echo "Retrying $i..." if eval "$@"; then - return 0 + return 0 fi - - for i in 2 1; do - sleep 3s - echo "Retrying $i..." - if eval "$@"; then - return 0 - fi - done - return 1 + done + return 1 } function setup_db_user_only() { - source scripts/create_postgres_user.sh + source scripts/create_postgres_user.sh } function setup_db() { - run_timed_command "setup_db_user_only" - run_timed_command "bundle exec rake db:drop db:create db:structure:load db:migrate gitlab:db:setup_ee" + run_timed_command "setup_db_user_only" + run_timed_command "bundle exec rake db:drop db:create db:structure:load db:migrate gitlab:db:setup_ee" } function install_api_client_dependencies_with_apk() { |