Merge "Add retry to build" into stable/train
This commit is contained in:
commit
72c98b6664
|
@ -121,6 +121,11 @@ class BuildahBuilder(base.BaseBuilder):
|
|||
if self.push_containers:
|
||||
self.push(self._get_destination(container_name))
|
||||
|
||||
@tenacity.retry( # Retry up to 3 times with 1 second delay
|
||||
reraise=True,
|
||||
wait=1,
|
||||
stop=tenacity.stop_after_attempt(3)
|
||||
)
|
||||
def build(self, container_name, container_build_path):
|
||||
"""Build an image from a given directory.
|
||||
|
||||
|
|
Loading…
Reference in New Issue