From 33ad439b8f4357b9b9906928ca922d2b13728d85 Mon Sep 17 00:00:00 2001 From: Vladimir Khlyunev Date: Tue, 21 May 2019 16:28:11 +0400 Subject: [PATCH] Use naginator retrigger in swarm jobs Change-Id: Ia3d5046ad0c930b1443dae5eb040adcde82c2730 --- maintenance-ci/mos/jobs/9.x.swarm.runner.yaml | 4 ++++ maintenance-ci/mos/templates/swarm-test.yaml | 13 +++++++++++++ .../mos/templates/testrail-report-9.x.yaml | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/maintenance-ci/mos/jobs/9.x.swarm.runner.yaml b/maintenance-ci/mos/jobs/9.x.swarm.runner.yaml index edcd905..747c743 100644 --- a/maintenance-ci/mos/jobs/9.x.swarm.runner.yaml +++ b/maintenance-ci/mos/jobs/9.x.swarm.runner.yaml @@ -24,6 +24,10 @@ name: RUN_REPORTER_AFTER_JOB default: true description: "Report results?" + - bool: # same as above - we want to reschedule only swarm-based runs + name: RERUN_AFTER_FAILURE + default: true + description: "Reschedule job after failure?" - 9x-systest-params - mos-jenkins-swarm-params diff --git a/maintenance-ci/mos/templates/swarm-test.yaml b/maintenance-ci/mos/templates/swarm-test.yaml index c37541c..95193ea 100644 --- a/maintenance-ci/mos/templates/swarm-test.yaml +++ b/maintenance-ci/mos/templates/swarm-test.yaml @@ -44,6 +44,10 @@ name: RUN_REPORTER_AFTER_JOB default: false description: "Report results?" + - bool: # same as above - we want to reschedule only swarm-based runs + name: RERUN_AFTER_FAILURE + default: false + description: "Reschedule job after failure?" - 9x-systest-params - text: name: EXTRA_OPTS @@ -97,6 +101,15 @@ - post-destroy-vms + # retry if job failed + - conditional-publisher: + - condition-kind: boolean-expression + condition-expression: $RERUN_AFTER_FAILURE + action: + - naginator: + max-failed-builds: 2 + fixed-delay: 600 + - description-setter: regexp: "'Description string: (.*)'" regexp-for-failed: "'Description string: (.*)'" diff --git a/maintenance-ci/mos/templates/testrail-report-9.x.yaml b/maintenance-ci/mos/templates/testrail-report-9.x.yaml index 1e5845e..1efb57c 100644 --- a/maintenance-ci/mos/templates/testrail-report-9.x.yaml +++ b/maintenance-ci/mos/templates/testrail-report-9.x.yaml @@ -43,6 +43,11 @@ publishers: + # retry if job failed + - naginator: + max-failed-builds: 10 + progressive-delay-increment: 30 + progressive-delay-maximum: 600 - description-setter: regexp: '^.*Report URL:\s*(.*)' description: 'TestRail Report URL' -- 2.45.2