Content-Length: 4752 | pFad | http://github.com/postgrespro/testgres/pull/210.patch
thub.com
From a9389f876f4105cd17627963d15d745fa7448e59 Mon Sep 17 00:00:00 2001
From: "d.kovalenko"
Date: Tue, 11 Mar 2025 14:40:54 +0300
Subject: [PATCH 1/4] Dockerfile to run all tests on Alpine Linux
---
Dockerfile--alpine.tmpl | 60 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 Dockerfile--alpine.tmpl
diff --git a/Dockerfile--alpine.tmpl b/Dockerfile--alpine.tmpl
new file mode 100644
index 00000000..dfd9ab20
--- /dev/null
+++ b/Dockerfile--alpine.tmpl
@@ -0,0 +1,60 @@
+FROM postgres:${PG_VERSION}-alpine
+
+ENV PYTHON=python${PYTHON_VERSION}
+RUN if [ "${PYTHON_VERSION}" = "2" ] ; then \
+ apk add --no-cache curl python2 python2-dev build-base musl-dev \
+ linux-headers py-virtualenv py-pip; \
+ fi
+RUN if [ "${PYTHON_VERSION}" = "3" ] ; then \
+ apk add --no-cache curl python3 python3-dev build-base musl-dev \
+ linux-headers py-virtualenv; \
+ fi
+
+#RUN apk add --no-cache mc
+
+# Full version of "ps" command
+RUN apk add --no-cache procps
+
+RUN apk add --no-cache openssh
+RUN apk add --no-cache sudo
+
+ENV LANG=C.UTF-8
+
+RUN addgroup -S sudo
+RUN adduser postgres sudo
+
+EXPOSE 22
+RUN ssh-keygen -A
+
+ADD . /pg/testgres
+WORKDIR /pg/testgres
+RUN chown -R postgres:postgres /pg
+
+# It allows to use sudo without password
+RUN sh -c "echo \"postgres ALL=(ALL:ALL) NOPASSWD:ALL\"">>/etc/sudoers
+
+# THIS CMD IS NEEDED TO CONNECT THROUGH SSH WITHOUT PASSWORD
+RUN sh -c "echo "postgres:*" | chpasswd -e"
+
+USER postgres
+
+# THIS CMD IS NEEDED TO CONNECT THROUGH SSH WITHOUT PASSWORD
+RUN chmod 700 ~/
+
+RUN mkdir -p ~/.ssh
+#RUN chmod 700 ~/.ssh
+
+#ENTRYPOINT PYTHON_VERSION=${PYTHON_VERSION} bash run_tests.sh
+
+ENTRYPOINT sh -c " \
+set -eux; \
+echo HELLO FROM ENTRYPOINT; \
+echo HOME DIR IS [`realpath ~/`]; \
+ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
+cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
+chmod 600 ~/.ssh/authorized_keys; \
+ls -la ~/.ssh/; \
+sudo /usr/sbin/sshd; \
+ssh-keyscan -H localhost >> ~/.ssh/known_hosts; \
+ssh-keyscan -H 127.0.0.1 >> ~/.ssh/known_hosts; \
+TEST_FILTER=\"\" PYTHON_VERSION=${PYTHON_VERSION} bash run_tests.sh;"
From dbaa8cf98ac94c5f40548573519a810f4c96cccd Mon Sep 17 00:00:00 2001
From: "d.kovalenko"
Date: Tue, 11 Mar 2025 14:43:46 +0300
Subject: [PATCH 2/4] A run of all the tests on Alpine Linux [PY3, PG17] is
added
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 4110835a..ab1de699 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,6 +28,7 @@ env:
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=12
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=11
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=10
+ - TEST_PLATFORM=alpine PYTHON_VERSION=3 PG_VERSION=17
- TEST_PLATFORM=ubuntu-24_04 PYTHON_VERSION=3 PG_VERSION=17
matrix:
From 72b3ac064f8eabc8171142023e1ebd1318c0304c Mon Sep 17 00:00:00 2001
From: "d.kovalenko"
Date: Tue, 11 Mar 2025 16:12:28 +0300
Subject: [PATCH 3/4] [CI] The run of [STD, PY3, PG17] is removed
It was replaced with [ALPINE, PY3, PG17].
---
.travis.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index ab1de699..a300fc47 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,7 +20,6 @@ notifications:
on_failure: always
env:
- - TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=17
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=16
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=15
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=14
From 19ab03660a5dec78b4e3ad0ab56939ba2105aea8 Mon Sep 17 00:00:00 2001
From: "d.kovalenko"
Date: Tue, 11 Mar 2025 17:15:15 +0300
Subject: [PATCH 4/4] Test platform "alpine" was renamed with "std.all"
---
.travis.yml | 2 +-
Dockerfile--alpine.tmpl => Dockerfile--std.all.tmpl | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename Dockerfile--alpine.tmpl => Dockerfile--std.all.tmpl (100%)
diff --git a/.travis.yml b/.travis.yml
index a300fc47..7fb34808 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ env:
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=12
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=11
- TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=10
- - TEST_PLATFORM=alpine PYTHON_VERSION=3 PG_VERSION=17
+ - TEST_PLATFORM=std.all PYTHON_VERSION=3 PG_VERSION=17
- TEST_PLATFORM=ubuntu-24_04 PYTHON_VERSION=3 PG_VERSION=17
matrix:
diff --git a/Dockerfile--alpine.tmpl b/Dockerfile--std.all.tmpl
similarity index 100%
rename from Dockerfile--alpine.tmpl
rename to Dockerfile--std.all.tmpl
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/postgrespro/testgres/pull/210.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy