Skip to content

Commit a20872f

Browse files
authored
Merge pull request #174 from citusdata/eag/tests
Citus upgrade tests for PG 16 and Citus 12
2 parents 97072ce + f7a444d commit a20872f

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

circleci/images/Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@ 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+
# 12.1.10 is the latest release of Citus 12 when the test is expanded to cover Citus 12
23+
CITUS_UPGRADE_VERSIONS_15=v11.1.0 v11.3.0 v12.1.10
24+
CITUS_UPGRADE_VERSIONS_16=v12.1.10
25+
26+
# Function to get Citus versions for a specific PG major version
27+
get_citus_versions = $(CITUS_UPGRADE_VERSIONS_$(1))
2328

2429
# code below creates targets for all postgres versions in PG_VERSIONS
2530
define make-image-targets
2631
# $1 = PG_VERSION
2732
# $2 = PG_MAJOR
28-
# $3 = PG_VERION_CLEAN
33+
# $3 = PG_VERSION_CLEAN
2934

3035
build-extbuilder-$1:
3136
docker build \
@@ -92,15 +97,15 @@ $(foreach element,$(PG_VERSIONS),$(eval $(call make-image-targets,$(element),$(s
9297
define make-citus-upgrage-targets
9398
# $1 = PG_VERSION
9499
# $2 = PG_MAJOR
95-
# $3 = PG_VERION_CLEAN
100+
# $3 = PG_VERSION_CLEAN
96101

97102
build-citusupgradetester-$1:
98103
docker build \
99104
citusupgradetester/ \
100105
-f citusupgradetester/Dockerfile \
101106
--build-arg=PG_VERSION=$1 \
102107
--build-arg=PG_MAJOR=$2 \
103-
--build-arg=CITUS_VERSIONS="${CITUS_UPGRADE_VERSIONS}"\
108+
--build-arg=CITUS_VERSIONS="$(call get_citus_versions,$2)" \
104109
--tag=${DOCKER_REPO}/citusupgradetester:$3${TAG_SUFFIX}
105110

106111
build-all:: build-citusupgradetester-$1

0 commit comments

Comments
 (0)