github.com/verrazzano/verrazzano@v1.7.0/make/retry.mk (about)

     1  # Copyright (C) 2021, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  DEFAULT_RETRIES:=5
     5  
     6  #
     7  # Retry a command a parameterized amount of times.
     8  #
     9  define retry_cmd
    10      for i in `seq 1 $1`; do $2 && break; done
    11  endef
    12  
    13  define retry_docker_push
    14      $(call retry_cmd,${DEFAULT_RETRIES},docker push $1)
    15  endef