Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Python 3.11 #95

Merged
merged 8 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
plone/plone-backend
ghcr.io/plone/plone-backend
tags: |
type=raw,value=test
type=sha

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -37,8 +37,9 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image for testing
uses: docker/build-push-action@v3
Expand All @@ -50,4 +51,4 @@ jobs:

- name: Test
run: |
./test/run.sh plone/plone-backend:test
./test/run.sh ${{ steps.meta.outputs.tags }}
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.10
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bullseye as base
FROM base as builder

ENV PIP_PARAMS=""
ENV PIP_VERSION=22.2.2
ENV PIP_VERSION=22.3.1
ENV PLONE_VERSION=6.0.0rc1
ENV EXTRA_PACKAGES="relstorage==3.4.5 psycopg2==2.9.3 python-ldap==3.4.0"

RUN <<EOT
apt-get update
buildDeps="dpkg-dev gcc libbz2-dev libc6-dev libffi-dev libjpeg62-turbo-dev libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libsasl2-dev libssl-dev libtiff5-dev libxml2-dev libxslt1-dev wget zlib1g-dev python3-dev build-essential"
buildDeps="build-essential libbz2-dev libffi-dev libjpeg62-turbo-dev libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libsasl2-dev libssl-dev libtiff5-dev libxml2-dev libxslt1-dev wget zlib1g-dev"
jensens marked this conversation as resolved.
Show resolved Hide resolved
apt-get install -y --no-install-recommends $buildDeps
rm -rf /var/lib/apt/lists/* /usr/share/doc
python -m venv /app
/app/bin/pip install -U "pip==${PIP_VERSION}"
/app/bin/pip install Plone plone.volto ${EXTRA_PACKAGES} -c https://dist.plone.org/release/$PLONE_VERSION/constraints.txt ${PIP_PARAMS}
/app/bin/pip install -U "pip==${PIP_VERSION}" wheel
/app/bin/pip install Plone ${EXTRA_PACKAGES} -c https://dist.plone.org/release/$PLONE_VERSION/constraints.txt ${PIP_PARAMS}
find /app \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' +
EOT

Expand All @@ -37,8 +37,9 @@ WORKDIR /app
COPY --from=builder --chown=500:500 /app /app

RUN <<EOT
ls -la /app/bin
useradd --system -m -d /app -U -u 500 plone
runDeps="git libjpeg62 libopenjp2-7 libpq5 libtiff5 libxml2 libxslt1.1 lynx netcat poppler-utils rsync wv busybox gosu libmagic1 make"
runDeps="git libjpeg62 libopenjp2-7 libpq5 libtiff5 libxml2 libxslt1.1 lynx netcat poppler-utils rsync wv busybox gosu libmagic1"
apt-get update
apt-get install -y --no-install-recommends $runDeps
apt-get clean -y
Expand Down
29 changes: 16 additions & 13 deletions test/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@ globalTests+=(
override-cmd
)

imageTests_main_set='
plone-basics
plone-develop
plone-site
plone-addons
plone-cors
plone-arbitrary-user
plone-listenport
plone-zeoclient
plone-relstorage
plone-shared-blob-dir
'

imageTests+=(
[plone/plone-backend]='
plone-basics
plone-develop
plone-site
plone-addons
plone-cors
plone-arbitrary-user
plone-listenport
plone-zeoclient
plone-relstorage
plone-shared-blob-dir
'
[plone/plone-backend]=$imageTests_main_set
[ghcr.io/plone/plone-backend]=$imageTests_main_set
)

globalExcludeTests+=(

)