File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Configure FwC test branches
4+ # We do not want 7.x branch and only to run for branches that:
5+ # - have released at least one minor version (not main)
6+ # - have previous minor unreleased (not the oldest development branch)
7+ FWC_BRANCHES=()
8+ for branch in " ${BRANCHES[@]} " ; do
9+ if [[ ! " $branch " =~ ^7\. .* ]]; then
10+ FWC_BRANCHES+=(" $branch " )
11+ fi
12+ done
13+ # Remove first and last element
14+ FWC_BRANCHES=(" ${FWC_BRANCHES[@]: 1: ${# FWC_BRANCHES[@]} -2} " )
15+
16+ shouldRunFwcFor () {
17+ local branch=$1
18+ for fwc_branch in " ${FWC_BRANCHES[@]} " ; do
19+ if [[ " $fwc_branch " == " $branch " ]]; then
20+ return 0
21+ fi
22+ done
23+ return 1
24+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ set -euo pipefail
55echo " steps:"
66
77source .buildkite/scripts/branches.sh
8+ source .buildkite/scripts/fwc-branches.sh
89
910IS_FIRST=true
1011SKIP_DELAY=" ${SKIP_DELAY:- false} "
4647 branch: "$BRANCH "
4748 commit: "$LAST_GOOD_COMMIT "
4849EOF
49- # Include forward compatibility tests only for the bugfix branch
50- if [[ " ${BRANCH} " == " ${BRANCHES[2]} " ]]; then
50+ if shouldRunFwcFor " $BRANCH " ; then
5151 cat << EOF
5252 - trigger: elasticsearch-periodic-fwc
5353 label: Trigger periodic-fwc pipeline for $BRANCH
You can’t perform that action at this time.
0 commit comments