From 878a69bcd03aa50b9f0152e60e52f566a6938d53 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Fri, 20 Feb 2026 08:42:11 +0200 Subject: [PATCH] Add timing out docker executable --- Jenkinsfile | 4 ++++ timeout_docker.sh | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 timeout_docker.sh diff --git a/Jenkinsfile b/Jenkinsfile index 4195f6b..e6ba29a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,6 +20,7 @@ pipeline { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { sh 'sh kill_days_containers.sh' sh 'docker system prune -a -f' + sh 'install timeout_docker.sh /usr/local/bin/docker' } } } @@ -31,6 +32,7 @@ pipeline { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { sh 'sh kill_days_containers.sh' sh 'docker system prune -a -f' + sh 'install timeout_docker.sh /usr/local/bin/docker' } } } @@ -42,6 +44,7 @@ pipeline { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { sh 'sh kill_days_containers.sh' sh 'docker system prune -a -f' + sh 'install timeout_docker.sh /usr/local/bin/docker' } } } @@ -53,6 +56,7 @@ pipeline { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { sh 'sh kill_days_containers.sh' sh 'docker system prune -a -f' + sh 'install timeout_docker.sh /usr/local/bin/docker' } } } diff --git a/timeout_docker.sh b/timeout_docker.sh new file mode 100644 index 0000000..f0eec4d --- /dev/null +++ b/timeout_docker.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -x +timeout -f --kill-after=1 5h /usr/bin/docker "$@" +