mirror of https://github.com/commaai/openpilot.git
jenkins: retry docker_build (#30629)
* retry docker build
* retry docker build
* retry docker build
* does this work nicely?
* docker fail!
* Revert "docker fail!"
This reverts commit ab227a1ea3
.
This commit is contained in:
parent
93cd19e3a5
commit
02373fcb05
|
@ -1,8 +1,7 @@
|
|||
def retryWithDelay(int maxRetries, int delay, Closure body) {
|
||||
for (int i = 0; i < maxRetries; i++) {
|
||||
try {
|
||||
body()
|
||||
return
|
||||
return body()
|
||||
} catch (Exception e) {
|
||||
sleep(delay)
|
||||
}
|
||||
|
@ -101,7 +100,12 @@ def pcStage(String stageName, Closure body) {
|
|||
checkout scm
|
||||
|
||||
def dockerArgs = "--user=batman -v /tmp/comma_download_cache:/tmp/comma_download_cache -v /tmp/scons_cache:/tmp/scons_cache -e PYTHONPATH=${env.WORKSPACE}";
|
||||
docker.build("openpilot-base:build-${env.GIT_COMMIT}", "-f Dockerfile.openpilot_base .").inside(dockerArgs) {
|
||||
|
||||
def openpilot_base = retryWithDelay (3, 15) {
|
||||
return docker.build("openpilot-base:build-${env.GIT_COMMIT}", "-f Dockerfile.openpilot_base .")
|
||||
}
|
||||
|
||||
openpilot_base.inside(dockerArgs) {
|
||||
timeout(time: 20, unit: 'MINUTES') {
|
||||
try {
|
||||
retryWithDelay (3, 15) {
|
||||
|
|
Loading…
Reference in New Issue