File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7878 echo "::endgroup::"
7979
8080 echo "::group::Starting Redis servers"
81- redis_major_version=$(echo "$REDIS_VERSION" | grep -oP '^\d+')
81+ set -x
82+ # Check if REDIS_VERSION is in the custom map
83+ mapped_version=""
84+ if [[ -n "${REDIS_VERSION_CUSTOM_MAP:-}" ]]; then
85+ for mapping in $REDIS_VERSION_CUSTOM_MAP; do
86+ tag="${mapping%%:*}"
87+ version="${mapping##*:}"
88+ if [[ "$REDIS_VERSION" == "$tag" ]]; then
89+ mapped_version="$version"
90+ echo "Found custom mapping: $REDIS_VERSION -> $mapped_version"
91+ break
92+ fi
93+ done
94+ fi
95+ # Use mapped version if found, otherwise use REDIS_VERSION
96+ version_to_parse="${mapped_version:-$REDIS_VERSION}"
97+ redis_major_version=$(echo "$version_to_parse" | grep -oP '^\d+')
8298 echo "REDIS_MAJOR_VERSION=${redis_major_version}" >> $GITHUB_ENV
8399
84100 if (( redis_major_version < 8 )); then
@@ -117,6 +133,7 @@ runs:
117133 fi
118134
119135 sleep 10 # time to settle
136+ set +x
120137 echo "::endgroup::"
121138 shell : bash
122139
Original file line number Diff line number Diff line change 3131 # for example after 8.2.1 is published, 8.2 image contains 8.2.1 content
3232 CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG : ' 8.4.0'
3333 CURRENT_REDIS_VERSION : ' 8.4.0'
34+ REDIS_VERSION_CUSTOM_MAP : ' custom-21651605017-debian-amd64:8.6'
3435
3536jobs :
3637 dependency-audit :
You can’t perform that action at this time.
0 commit comments