Skip to content

Commit 5548acc

Browse files
committed
Citus upgrade tests for PG 16 and Citus 12
1 parent 97072ce commit 5548acc

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

circleci/images/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ PG_UPGRADE_TESTER_VERSION=$(shell echo ${PG_VERSIONS}|tr ' ' '-'|sed 's/~//g')
1616

1717
STYLE_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
2529
define make-image-targets
2630
# $1 = PG_VERSION
2731
# $2 = PG_MAJOR
28-
# $3 = PG_VERION_CLEAN
32+
# $3 = PG_VERSION_CLEAN
2933

3034
build-extbuilder-$1:
3135
docker build \
@@ -92,15 +96,15 @@ $(foreach element,$(PG_VERSIONS),$(eval $(call make-image-targets,$(element),$(s
9296
define make-citus-upgrage-targets
9397
# $1 = PG_VERSION
9498
# $2 = PG_MAJOR
95-
# $3 = PG_VERION_CLEAN
99+
# $3 = PG_VERSION_CLEAN
96100

97101
build-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

106110
build-all:: build-citusupgradetester-$1

0 commit comments

Comments
 (0)