Skip to content

Commit 2c9ea57

Browse files
committed
DRY up retry declaration a bit
1 parent 5bdc1cb commit 2c9ea57

File tree

2 files changed

+28
-70
lines changed

2 files changed

+28
-70
lines changed

.buildkite/pipelines/periodic.template.yml

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
x-spot-retry: &spot-retry
2+
retry:
3+
automatic:
4+
- exit_status: "-1"
5+
limit: 3
6+
signal_reason: none
7+
- signal_reason: agent_stop
8+
limit: 3
9+
110
steps:
211
- group: bwc
312
steps: $BWC_STEPS
@@ -24,13 +33,7 @@ steps:
2433
env:
2534
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
2635
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
27-
retry:
28-
automatic:
29-
- exit_status: "-1"
30-
limit: 3
31-
signal_reason: none
32-
- signal_reason: agent_stop
33-
limit: 3
36+
<<: *spot-retry
3437
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-fips-matrix-bwc"
3538
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dtests.fips.enabled=true v$$BWC_VERSION#bwcTest
3639
timeout_in_minutes: 300
@@ -48,13 +51,7 @@ steps:
4851
env:
4952
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
5053
BWC_VERSION: "{{matrix.BWC_VERSION}}"
51-
retry:
52-
automatic:
53-
- exit_status: "-1"
54-
limit: 3
55-
signal_reason: none
56-
- signal_reason: agent_stop
57-
limit: 3
54+
<<: *spot-retry
5855
- group: java-matrix
5956
steps:
6057
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.GRADLE_TASK}} / java-matrix"
@@ -80,13 +77,7 @@ steps:
8077
env:
8178
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
8279
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
83-
retry:
84-
automatic:
85-
- exit_status: "-1"
86-
limit: 3
87-
signal_reason: none
88-
- signal_reason: agent_stop
89-
limit: 3
80+
<<: *spot-retry
9081
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-matrix-bwc"
9182
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$BWC_VERSION#bwcTest
9283
timeout_in_minutes: 300
@@ -106,13 +97,7 @@ steps:
10697
env:
10798
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
10899
BWC_VERSION: "{{matrix.BWC_VERSION}}"
109-
retry:
110-
automatic:
111-
- exit_status: "-1"
112-
limit: 3
113-
signal_reason: none
114-
- signal_reason: agent_stop
115-
limit: 3
100+
<<: *spot-retry
116101
- group: platform-support-unix
117102
steps:
118103
- label: "{{matrix.image}} / platform-support-unix"
@@ -146,10 +131,4 @@ steps:
146131
machineType: n1-standard-32
147132
preemptible: true
148133
env: {}
149-
retry:
150-
automatic:
151-
- exit_status: "-1"
152-
limit: 3
153-
signal_reason: none
154-
- signal_reason: agent_stop
155-
limit: 3
134+
<<: *spot-retry

.buildkite/pipelines/periodic.yml

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# This file is auto-generated. See .buildkite/pipelines/periodic.template.yml
2+
x-spot-retry: &spot-retry
3+
retry:
4+
automatic:
5+
- exit_status: "-1"
6+
limit: 3
7+
signal_reason: none
8+
- signal_reason: agent_stop
9+
limit: 3
10+
211
steps:
312
- group: bwc
413
steps:
@@ -652,13 +661,7 @@ steps:
652661
env:
653662
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
654663
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
655-
retry:
656-
automatic:
657-
- exit_status: "-1"
658-
limit: 3
659-
signal_reason: none
660-
- signal_reason: agent_stop
661-
limit: 3
664+
<<: *spot-retry
662665
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-fips-matrix-bwc"
663666
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dtests.fips.enabled=true v$$BWC_VERSION#bwcTest
664667
timeout_in_minutes: 300
@@ -676,13 +679,7 @@ steps:
676679
env:
677680
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
678681
BWC_VERSION: "{{matrix.BWC_VERSION}}"
679-
retry:
680-
automatic:
681-
- exit_status: "-1"
682-
limit: 3
683-
signal_reason: none
684-
- signal_reason: agent_stop
685-
limit: 3
682+
<<: *spot-retry
686683
- group: java-matrix
687684
steps:
688685
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.GRADLE_TASK}} / java-matrix"
@@ -708,13 +705,7 @@ steps:
708705
env:
709706
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
710707
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
711-
retry:
712-
automatic:
713-
- exit_status: "-1"
714-
limit: 3
715-
signal_reason: none
716-
- signal_reason: agent_stop
717-
limit: 3
708+
<<: *spot-retry
718709
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-matrix-bwc"
719710
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$BWC_VERSION#bwcTest
720711
timeout_in_minutes: 300
@@ -734,13 +725,7 @@ steps:
734725
env:
735726
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
736727
BWC_VERSION: "{{matrix.BWC_VERSION}}"
737-
retry:
738-
automatic:
739-
- exit_status: "-1"
740-
limit: 3
741-
signal_reason: none
742-
- signal_reason: agent_stop
743-
limit: 3
728+
<<: *spot-retry
744729
- group: platform-support-unix
745730
steps:
746731
- label: "{{matrix.image}} / platform-support-unix"
@@ -774,10 +759,4 @@ steps:
774759
machineType: n1-standard-32
775760
preemptible: true
776761
env: {}
777-
retry:
778-
automatic:
779-
- exit_status: "-1"
780-
limit: 3
781-
signal_reason: none
782-
- signal_reason: agent_stop
783-
limit: 3
762+
<<: *spot-retry

0 commit comments

Comments
 (0)