mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 05:34:46 +00:00
Merge pull request #11184 from microsoft/danmihai1/retry-genpolicy
ci: retry genpolicy execution
This commit is contained in:
commit
706c2e2d68
@ -207,8 +207,15 @@ auto_generate_policy() {
|
|||||||
|
|
||||||
genpolicy_command+=" ${additional_flags}"
|
genpolicy_command+=" ${additional_flags}"
|
||||||
|
|
||||||
|
# Retry if genpolicy fails, because typical failures of this tool are caused by
|
||||||
|
# transient network errors.
|
||||||
|
for _ in {1..6}; do
|
||||||
info "Executing: ${genpolicy_command}"
|
info "Executing: ${genpolicy_command}"
|
||||||
eval "${genpolicy_command}"
|
eval "${genpolicy_command}" && return 0
|
||||||
|
info "Sleeping after command failed..."
|
||||||
|
sleep 10s
|
||||||
|
done
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Change genpolicy settings to allow "kubectl exec" to execute a command
|
# Change genpolicy settings to allow "kubectl exec" to execute a command
|
||||||
|
Loading…
Reference in New Issue
Block a user