@@ -16,16 +16,20 @@ PG_UPGRADE_TESTER_VERSION=$(shell echo ${PG_VERSIONS}|tr ' ' '-'|sed 's/~//g')
1616
1717STYLE_CHECKER_TOOLS_VERSION =0.8.18
1818
19- # we should add more majors/citus versions when we address https://github.com/citusdata/citus/issues/4807
20- CITUS_UPGRADE_PG_VERSIONS =$(shell head -n1 PG_VERSIONS|cut -c 6-|tr '\n' ' ' )
19+ # Upgrade tests for the previous 2 Citus major versions
20+ CITUS_UPGRADE_PG_VERSIONS =$(shell head -n2 PG_VERSIONS|cut -c 6-|tr '\n' ' ')
2121# 11.1.0 is the oldest version supporting PG15, whereas 11.3.0 is for upgrade_pg_dist_cleanup tests
22- CITUS_UPGRADE_VERSIONS =v11.1.0 v11.3.0
22+ CITUS_UPGRADE_VERSIONS_15 =v11.1.0 v11.3.0 v12.1.10
23+ CITUS_UPGRADE_VERSIONS_16 =v12.1.10
24+
25+ # Function to get Citus versions for a specific PG major version
26+ get_citus_versions = $(CITUS_UPGRADE_VERSIONS_$(1 ) )
2327
2428# code below creates targets for all postgres versions in PG_VERSIONS
2529define make-image-targets
2630# $1 = PG_VERSION
2731# $2 = PG_MAJOR
28- # $3 = PG_VERION_CLEAN
32+ # $3 = PG_VERSION_CLEAN
2933
3034build-extbuilder-$1:
3135 docker build \
@@ -92,15 +96,15 @@ $(foreach element,$(PG_VERSIONS),$(eval $(call make-image-targets,$(element),$(s
9296define make-citus-upgrage-targets
9397# $1 = PG_VERSION
9498# $2 = PG_MAJOR
95- # $3 = PG_VERION_CLEAN
99+ # $3 = PG_VERSION_CLEAN
96100
97101build-citusupgradetester-$1:
98102 docker build \
99103 citusupgradetester/ \
100104 -f citusupgradetester/Dockerfile \
101105 --build-arg=PG_VERSION=$1 \
102106 --build-arg=PG_MAJOR=$2 \
103- --build-arg=CITUS_VERSIONS="${CITUS_UPGRADE_VERSIONS}" \
107+ --build-arg=CITUS_VERSIONS="$( call get_citus_versions,$2) " \
104108 --tag=${DOCKER_REPO}/citusupgradetester:$3${TAG_SUFFIX}
105109
106110build-all:: build-citusupgradetester-$1
0 commit comments