Added 12h timeout to all pipelines
Change-Id: I085fcbda322d0877d5ffebd002fc109577788c29
diff --git a/docker-cleanup-pipeline.groovy b/docker-cleanup-pipeline.groovy
index 677efdf..710b1bb 100644
--- a/docker-cleanup-pipeline.groovy
+++ b/docker-cleanup-pipeline.groovy
@@ -12,22 +12,23 @@
def python = new com.mirantis.mk.Python()
def pepperEnv = "pepperEnv"
-
-node{
- def saltMaster;
- stage('Setup virtualenv for Pepper') {
- python.setupPepperVirtualenv(pepperEnv, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
- }
- stage("Clean old containers"){
- salt.cmdRun(pepperEnv, 'I@jenkins:slave', """
- docker ps --format='{{.ID}}' | xargs -n 1 -r docker inspect \\
- -f '{{.ID}} {{.State.Running}} {{.State.StartedAt}}' \\
- | awk '\$2 == "true" && \$3 <= "'\$(date -d '${TEST_DATE_STRING}' -Ins --utc \\
- | sed 's/+0000/Z/')'" { print \$1 }' \\
- | xargs -r docker rm -f
- """, false)
- }
- stage("Run docker system prune"){
- salt.cmdRun(pepperEnv, 'I@jenkins:slave', "docker system prune -f")
+timeout(time: 12, unit: 'HOURS') {
+ node{
+ def saltMaster;
+ stage('Setup virtualenv for Pepper') {
+ python.setupPepperVirtualenv(pepperEnv, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
+ }
+ stage("Clean old containers"){
+ salt.cmdRun(pepperEnv, 'I@jenkins:slave', """
+ docker ps --format='{{.ID}}' | xargs -n 1 -r docker inspect \\
+ -f '{{.ID}} {{.State.Running}} {{.State.StartedAt}}' \\
+ | awk '\$2 == "true" && \$3 <= "'\$(date -d '${TEST_DATE_STRING}' -Ins --utc \\
+ | sed 's/+0000/Z/')'" { print \$1 }' \\
+ | xargs -r docker rm -f
+ """, false)
+ }
+ stage("Run docker system prune"){
+ salt.cmdRun(pepperEnv, 'I@jenkins:slave', "docker system prune -f")
+ }
}
}