Skip to content

Commit d6cfde1

Browse files
authored
Merge pull request #477 from hhorak/check-version2
Add a test in Dockerfile directly to check the version
2 parents 35992bb + 98ac6a4 commit d6cfde1

18 files changed

+18
-0
lines changed

10/Dockerfile.c8s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN yum -y module enable postgresql:10 && \
4545
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper postgresql-server postgresql-contrib" && \
4646
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4747
rpm -V $INSTALL_PKGS && \
48+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
4849
yum -y reinstall tzdata && \
4950
yum -y clean all --enablerepo='*' && \
5051
localedef -f UTF-8 -i en_US en_US.UTF-8 && \

10/Dockerfile.centos7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN yum install -y centos-release-scl-rh && \
4545
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper rh-postgresql10 rh-postgresql10-postgresql-contrib rh-postgresql10-syspaths rh-postgresql96-postgresql-server" && \
4646
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4747
rpm -V $INSTALL_PKGS && \
48+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
4849
yum -y clean all --enablerepo='*' && \
4950
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5051
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \

10/Dockerfile.rhel7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ RUN yum install -y yum-utils gettext && \
4949
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper rh-postgresql10 rh-postgresql10-postgresql-contrib rh-postgresql10-syspaths rh-postgresql96-postgresql-server" && \
5050
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
5151
rpm -V $INSTALL_PKGS && \
52+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
5253
yum -y clean all --enablerepo='*' && \
5354
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5455
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \

10/Dockerfile.rhel8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN yum -y module enable postgresql:10 && \
4646
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper postgresql-server postgresql-contrib" && \
4747
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4848
rpm -V $INSTALL_PKGS && \
49+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
4950
yum -y reinstall tzdata && \
5051
yum -y clean all --enablerepo='*' && \
5152
localedef -f UTF-8 -i en_US en_US.UTF-8 && \

12/Dockerfile.c8s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN yum -y module enable postgresql:12 && \
4646
INSTALL_PKGS="$INSTALL_PKGS pgaudit" && \
4747
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4848
rpm -V $INSTALL_PKGS && \
49+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
4950
yum -y reinstall tzdata && \
5051
yum -y clean all --enablerepo='*' && \
5152
localedef -f UTF-8 -i en_US en_US.UTF-8 && \

12/Dockerfile.centos7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN yum install -y centos-release-scl-rh && \
4646
INSTALL_PKGS="$INSTALL_PKGS rh-postgresql12-pgaudit" && \
4747
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4848
rpm -V $INSTALL_PKGS && \
49+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
4950
yum -y clean all --enablerepo='*' && \
5051
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5152
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \

12/Dockerfile.fedora

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ RUN INSTALL_PKGS="rsync tar gettext bind-utils postgresql-server postgresql-cont
5050
dnf -y module enable postgresql:12 && \
5151
dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
5252
rpm -V $INSTALL_PKGS && \
53+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
5354
dnf clean all && \
5455
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5556
mkdir -p /var/lib/pgsql/data && \

12/Dockerfile.rhel7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ RUN yum install -y yum-utils gettext && \
5050
INSTALL_PKGS="$INSTALL_PKGS rh-postgresql12-pgaudit" && \
5151
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
5252
rpm -V $INSTALL_PKGS && \
53+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
5354
yum -y clean all --enablerepo='*' && \
5455
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5556
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \

12/Dockerfile.rhel8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ RUN yum -y module enable postgresql:12 && \
4747
INSTALL_PKGS="$INSTALL_PKGS pgaudit" && \
4848
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4949
rpm -V $INSTALL_PKGS && \
50+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
5051
yum -y reinstall tzdata && \
5152
yum -y clean all --enablerepo='*' && \
5253
localedef -f UTF-8 -i en_US en_US.UTF-8 && \

13/Dockerfile.c8s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN yum -y module enable postgresql:13 && \
4646
INSTALL_PKGS="$INSTALL_PKGS pgaudit" && \
4747
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
4848
rpm -V $INSTALL_PKGS && \
49+
postgres -V | grep -qe "$POSTGRESQL_VERSION\." && echo "Found VERSION $POSTGRESQL_VERSION" && \
4950
yum -y reinstall tzdata && \
5051
yum -y clean all --enablerepo='*' && \
5152
localedef -f UTF-8 -i en_US en_US.UTF-8 && \

0 commit comments

Comments
 (0)