Skip to content

Commit

Permalink
Adds postgres support matrix support for debian based systems (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurkanindibay authored Oct 6, 2021
1 parent 0c3a592 commit 9a73da7
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 35 deletions.
21 changes: 16 additions & 5 deletions dockerfiles/debian-bullseye-all/scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down
21 changes: 16 additions & 5 deletions dockerfiles/debian-buster-all/scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down
21 changes: 16 additions & 5 deletions dockerfiles/debian-stretch-all/scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down
21 changes: 16 additions & 5 deletions dockerfiles/ubuntu-bionic-all/scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down
21 changes: 16 additions & 5 deletions dockerfiles/ubuntu-focal-all/scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down
21 changes: 16 additions & 5 deletions dockerfiles/ubuntu-xenial-all/scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down
21 changes: 16 additions & 5 deletions scripts/fetch_and_build_deb
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,26 @@ fi
# populate variables from packaging metadata file
# shellcheck source=/dev/null
source /buildfiles/pkgvars
# Read PostgreSQL versions from file.
# supported-postgres file is derived file from postgres-matrix.yml file by citus_package.
# If file does not exist, skip populating file
[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres

# set default values for certain packaging variables
# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file
declare pkglatest # to make shellcheck happy
pkgname="${deb_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file
# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions
pg_release_versions="${release_versions:-${releasepg}}"
pg_nightly_versions="${nightly_versions:-${nightlypg}}"


echo "Postgres versions:"
echo "Release Versions: ${pg_release_versions}"
echo "Nightly Versions: ${pg_nightly_versions}"

if [ -z "${pkglatest}" ]; then
echo "$0: pkgvars file must specify a value for pkglatest" >&2
Expand Down Expand Up @@ -96,7 +107,7 @@ case "${1}" in
exit $failure
fi

echo "${releasepg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
*)
if [ "${1}" == 'nightly' ]; then
Expand Down Expand Up @@ -124,7 +135,7 @@ case "${1}" in
packageversion="${nextversion}.citus~${packagesuffix}"
export CONF_EXTRA_VERSION="+${packagesuffix}"

echo "${nightlypg}" | tr ',' '\n' > "${builddir}/debian/pgversions"
echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions"
;;
esac

Expand Down

0 comments on commit 9a73da7

Please sign in to comment.