fix(migrate): Use python3-psycopg2 + system-site-packages for barman
ci/woodpecker/manual/migrate-paperless Pipeline failed
ci/woodpecker/manual/migrate-paperless Pipeline failed
The postgres:16 image lacks gcc / libpq-dev, so pip build of barman's psycopg2 dep fails. Install the compiled binary via apt and point the venv at system site-packages so barman[cloud] reuses it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -71,8 +71,11 @@ steps:
|
||||
- set -euo pipefail
|
||||
- export DEBIAN_FRONTEND=noninteractive
|
||||
- apt-get update -qq
|
||||
- apt-get install -y --no-install-recommends python3 python3-pip python3-venv awscli ca-certificates >/dev/null
|
||||
- python3 -m venv /opt/barman
|
||||
# python3-psycopg2 provides the compiled binary so barman's pip
|
||||
# install doesn't try to build psycopg2 from source (postgres:16
|
||||
# ships without gcc / libpq-dev).
|
||||
- apt-get install -y --no-install-recommends python3 python3-pip python3-venv python3-psycopg2 awscli ca-certificates >/dev/null
|
||||
- python3 -m venv --system-site-packages /opt/barman
|
||||
- /opt/barman/bin/pip install --no-cache-dir --quiet 'barman[cloud,aws-snapshots]'
|
||||
- export PATH="/opt/barman/bin:$PATH"
|
||||
# Wait for the ephemeral Postgres service to come up
|
||||
|
||||
@@ -77,8 +77,10 @@ steps:
|
||||
- set -euo pipefail
|
||||
- export DEBIAN_FRONTEND=noninteractive
|
||||
- apt-get update -qq
|
||||
- apt-get install -y --no-install-recommends python3 python3-pip python3-venv awscli ca-certificates >/dev/null
|
||||
- python3 -m venv /opt/barman
|
||||
# python3-psycopg2 provides the compiled binary so barman's pip
|
||||
# install doesn't try to build psycopg2 from source.
|
||||
- apt-get install -y --no-install-recommends python3 python3-pip python3-venv python3-psycopg2 awscli ca-certificates >/dev/null
|
||||
- python3 -m venv --system-site-packages /opt/barman
|
||||
- /opt/barman/bin/pip install --no-cache-dir --quiet 'barman[cloud,aws-snapshots]'
|
||||
- export PATH="/opt/barman/bin:$PATH"
|
||||
- |
|
||||
|
||||
Reference in New Issue
Block a user