Skip to content

Commit 089aebf

Browse files
authored
Merge pull request #215 from postgrespro/mstyushin/focal-repos
cicd: fix repo url for focal fossa packages
2 parents 8f96556 + c8fd840 commit 089aebf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

github-actions-tests/tests.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ elif [ "${OS}" = "centos:8" ]; then
9393
sudo bash /mamonsu/github-actions-tests/pg_install.sh --os="${OS}" --pmi="${PACKAGE_MANAGER_INSTALL}" --repo="${REPO}" --pg-version="${PG_VERSION}"
9494

9595
elif [ "${OS%:*}" = "ubuntu" ]; then
96+
# old versions of ubuntu got their packages in apt-archive.postgresql.org
97+
REPO_BASE_URL="http://apt.postgresql.org/pub/repos/apt"
98+
if [[ "${OS:7}" == "20.04" ]]; then
99+
REPO_BASE_URL="http://apt-archive.postgresql.org/pub/repos/apt"
100+
fi
96101
# install and set up components missing in docker image (sudo, wget, bc, unzip, lsb-release, gnupg, tzdata)
97102
apt-get clean && apt-get update && apt-get install -y sudo
98103
PACKAGE_MANAGER_INSTALL="sudo apt-get -y install"
@@ -110,7 +115,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
110115
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7FCC7D46ACCC4CF8
111116

112117
# add info about PG repo for ubuntu
113-
REPO="sudo sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt \$(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'; wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - ; sudo apt-get update"
118+
REPO="sudo sh -c 'echo \"deb ${REPO_BASE_URL} \$(lsb_release -cs)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list'; wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - ; sudo apt-get update"
114119

115120
# run tests
116121
sudo bash /mamonsu/github-actions-tests/pg_install.sh --os="${OS}" --pmi="${PACKAGE_MANAGER_INSTALL}" --repo="${REPO}" --pg-version="${PG_VERSION}"

0 commit comments

Comments
 (0)