mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 01:42:55 +00:00
fix pahs
This commit is contained in:
5
.github/workflows/build_and_test.yml
vendored
5
.github/workflows/build_and_test.yml
vendored
@@ -956,8 +956,9 @@ jobs:
|
||||
|
||||
- name: Extract postgres-extensions from container
|
||||
run: |
|
||||
rm -rf ./extensions-to-upload # Just in case
|
||||
rm -rf ./extensions-to-upload ./control_files # Just in case
|
||||
mkdir extensions-to-upload
|
||||
mkdir control_files
|
||||
|
||||
# TODO: Delete Neon extensitons (they always present on compute-node image)
|
||||
# rm -rf ./extensions-to-upload/share/extension/neon*
|
||||
@@ -969,6 +970,8 @@ jobs:
|
||||
# rm -rf ./extensions-to-upload/lib/pkgconfig
|
||||
|
||||
docker cp -r ${{ steps.create-container.outputs.EID }}:/extensions ./extensions-to-upload
|
||||
docker cp -r ${{ steps.create-container.outputs.EID }}:/control_files ./control_files
|
||||
python3 combine_control_files.py
|
||||
|
||||
- name: Upload postgres-extensions to S3
|
||||
run: |
|
||||
|
||||
@@ -536,10 +536,9 @@ RUN wget https://github.com/neondatabase/pg_embedding/archive/2465f831ea1f8d49c1
|
||||
echo 'trusted = true' >> /usr/local/pgsql/share/extension/embedding.control &&\
|
||||
find /usr/local/pgsql -type f | sort > /after_embedding.txt &&\
|
||||
/bin/bash -c 'for from in $(comm -13 /before_embedding.txt /after_embedding.txt); do to=/extensions/public/embedding/${from:17} && mkdir -p $(dirname ${to}) && cp -a ${from} ${to}; done' && \
|
||||
mkdir /control_files &&\
|
||||
tar -zcvf /extensions/public/embedding.tar.gz /extensions/public/embedding && \
|
||||
mkdir /control_files &&\
|
||||
cp /usr/local/pgsql/share/extension/embedding.control /control_files/embedding.control
|
||||
mkdir -p /control_files/public &&\
|
||||
cp /usr/local/pgsql/share/extension/embedding.control /control_files/public/embedding.control
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
@@ -562,8 +561,8 @@ RUN wget https://gitlab.com/dalibo/postgresql_anonymizer/-/archive/1.1.0/postgre
|
||||
/bin/bash -c 'for from in $(comm -13 /before.txt /after.txt); do to=/extensions/123454321/anon/${from:17} && mkdir -p $(dirname ${to}) && cp -a ${from} ${to}; done' && \
|
||||
mkdir /control_files &&\
|
||||
tar -zcvf /extensions/123454321/anon.tar.gz /extensions/123454321/anon && \
|
||||
mkdir /control_files &&\
|
||||
cp /usr/local/pgsql/share/extension/anon.control /control_files/anon.control
|
||||
mkdir -p /control_files/123454321 &&\
|
||||
cp /usr/local/pgsql/share/extension/anon.control /control_files/123454321/anon.control
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
@@ -752,7 +751,7 @@ RUN rm /usr/local/pgsql/lib/lib*.a
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
# Extenstion only
|
||||
# Extension only
|
||||
#
|
||||
#########################################################################################
|
||||
FROM scratch AS postgres-extensions
|
||||
@@ -761,10 +760,10 @@ FROM scratch AS postgres-extensions
|
||||
#
|
||||
# extensions
|
||||
COPY --from=pg-anon-pg-build /extensions/123454321/anon.tar.gz /extensions/123454321/anon.tar.gz
|
||||
COPY --from=pg-anon-pg-build /control_files/anon.control /control_files/anon.control
|
||||
COPY --from=pg-anon-pg-build /control_files/123454321/anon.control /control_files/123454321/anon.control
|
||||
|
||||
COPY --from=pg-embedding-pg-build /extensions/public/embedding.tar.gz /extensions/public/embedding.tar.gz
|
||||
COPY --from=pg-embedding-pg-build /control_files/embedding.control /control_files/embedding.control
|
||||
COPY --from=pg-embedding-pg-build /control_files/public/embedding.control /control_files/public/embedding.control
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
|
||||
15
combine_control_files.py
Normal file
15
combine_control_files.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
index = {}
|
||||
os.chdir("control_files")
|
||||
for prefix in os.listdir("."):
|
||||
for file in os.listdir(prefix):
|
||||
with open(fname, "r") as f:
|
||||
ext_name = fname.replace(".control", "")
|
||||
control = f.read()
|
||||
index[ext_name] = {
|
||||
"path": f"{prefix}/{ext_name}.tar.gz",
|
||||
"control": control
|
||||
}
|
||||
|
||||
9
command.txt
Normal file
9
command.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
docker build --build-arg PG_VERSION=v15 -f Dockerfile.compute-node --tag neondatabase/compute-node:pg-embedding-pg-build --target pg-embedding-pg-build .
|
||||
docker create --name pg-embedding-pg-build neondatabase/compute-node:pg-embedding-pg-build
|
||||
docker cp pg-embedding-pg-build:/ ./pg-embedding-pg-build
|
||||
docker build --build-arg PG_VERSION=v15 -f Dockerfile.compute-node --tag neondatabase/compute-node:pg-anon-pg-build --target pg-anon-pg-build .
|
||||
docker create --name pg-anon-pg-build neondatabase/compute-node:pg-anon-pg-build
|
||||
docker cp pg-anon-pg-build:/ ./pg-anon-pg-build
|
||||
docker build --build-arg PG_VERSION=v15 -f Dockerfile.compute-node --tag neondatabase/compute-node:postgres-extensions --target postgres-extensions .
|
||||
docker create --name postgres-extensions neondatabase/compute-node:postgres-extensions true
|
||||
docker cp postgres-extensions:/ ./postgres-extensions
|
||||
Reference in New Issue
Block a user