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

enable build for Debian/Bullseye+Bookworm #529

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ jobs:
# Build debian packages
strategy:
matrix:
suite: [jammy]
suite: [jammy, bullseye, bookworm]
include:
- suite: jammy
os-version: ubuntu-20.04
- suite: bullseye
os-version: ubuntu-22.04
- suite: bookworm
os-version: ubuntu-22.04
fail-fast: false
runs-on: ${{ matrix.os-version }}
Expand Down Expand Up @@ -88,9 +92,9 @@ jobs:
- name: Install Debian Package and run Medusa
run: |
version=$(cat VERSION)
cd packages
sudo dpkg -i cassandra-medusa_${version}-0~${{ matrix.suite }}0_amd64.deb
medusa
cd packaging/docker-build
docker compose build cassandra-medusa-tester-${{ matrix.suite }}
docker compose run cassandra-medusa-tester-${{ matrix.suite }} cassandra-medusa_${version}-0~${{ matrix.suite }}0_amd64.deb
exit $?

integration-tests:
Expand Down Expand Up @@ -450,10 +454,12 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
strategy:
matrix:
suite: [jammy]
suite: [jammy, bionic]
include:
- suite: jammy
os-version: ubuntu-22.04
os-version: ubuntu-20.04
- suite: bionic
os-version: ubuntu-18.04
fail-fast: false
runs-on: ${{ matrix.os-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export DH_VIRTUALENV_INSTALL_ROOT = /usr/share

override_dh_virtualenv:
dh_virtualenv \
--python /usr/bin/python3.10 --preinstall=setuptools==40.3.0 --preinstall=pip==21.3.1 --preinstall=wheel --builtin-venv \
--python /usr/bin/python3 --preinstall=setuptools==40.3.0 --preinstall=pip==21.3.1 --preinstall=wheel --builtin-venv \
--preinstall=poetry==1.8.5 --preinstall=dh-poetry==0.2.0 --pip-tool=dh-poetry

override_dh_strip:
Expand Down
6 changes: 3 additions & 3 deletions packaging/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
set -e

case $1 in
""|bionic|buster|jammy)
""|jammy|bullseye|bookworm)
suites=("${1:-bionic}")
;;
all)
suites=(jammy bionic buster)
suites=(jammy bullseye bookworm)
;;
*)
echo "Unknown distribution suite - allowed values: 'all', 'bionic', 'buster'"
echo "Unknown distribution suite - allowed values: 'all', 'jammy', 'bullseye', 'bookworm'"
exit 1
;;
esac
Expand Down
63 changes: 63 additions & 0 deletions packaging/docker-build/Dockerfile-debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 2019 The Last Pickle Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG EXTRA_PACKAGES="python-dev python-pip"
ARG BUILD_IMAGE=ubuntu:18.04
FROM ${BUILD_IMAGE}

ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_IMAGE
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# use a common app path, copied from python-onbuild:latest
ENV WORKDIR /usr/src/app
RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}
ENV PIP_DEFAULT_TIMEOUT 100
RUN echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf

# add a repo that contains a backport of dh-virtualenv 1.1 for focal, bionic
RUN apt-get update && \
apt-get install -y software-properties-common

# install dependencies
RUN apt-get update \
&& apt-get install -y \
libffi-dev \
libssl-dev \
debhelper \
gcc \
dh-python \
dh-virtualenv \
python3-all \
python3-all-dev \
python3-dev \
python3-pip \
python3-setuptools \
python3-venv \
python3-wheel \
build-essential \
cmake \
devscripts \
equivs \
libevent-dev \
zlib1g-dev \
libssl-dev \
$EXTRA_PACKAGES

RUN pip3 install greenlet
RUN pip3 install gevent

# Add entrypoint script
COPY packaging/docker-build/docker-entrypoint.sh ${WORKDIR}
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
63 changes: 63 additions & 0 deletions packaging/docker-build/Dockerfile-debian-11
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 2019 The Last Pickle Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG EXTRA_PACKAGES="python-dev python-pip"
ARG BUILD_IMAGE=ubuntu:18.04
FROM ${BUILD_IMAGE}

ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_IMAGE
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# use a common app path, copied from python-onbuild:latest
ENV WORKDIR /usr/src/app
RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}
ENV PIP_DEFAULT_TIMEOUT 100
RUN echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf

# add a repo that contains a backport of dh-virtualenv 1.1 for jammy, bionic
RUN apt-get update && \
apt-get install -y software-properties-common

# install dependencies
RUN apt-get update \
&& apt-get install -y \
libffi-dev \
libssl-dev \
debhelper \
gcc \
dh-python \
dh-virtualenv \
python3-all \
python3-all-dev \
python3-dev \
python3-pip \
python3-setuptools \
python3-venv \
python3-wheel \
build-essential \
cmake \
devscripts \
equivs \
libevent-dev \
zlib1g-dev \
libssl-dev \
$EXTRA_PACKAGES

RUN pip3 install greenlet
RUN pip3 install gevent

# Add entrypoint script
COPY packaging/docker-build/docker-entrypoint.sh ${WORKDIR}
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
62 changes: 62 additions & 0 deletions packaging/docker-build/Dockerfile-debian-12
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright 2019 The Last Pickle Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG EXTRA_PACKAGES="python-dev python-pip"
ARG BUILD_IMAGE=ubuntu:18.04
FROM ${BUILD_IMAGE}

ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_IMAGE
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# use a common app path, copied from python-onbuild:latest
ENV WORKDIR /usr/src/app
RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}
ENV PIP_DEFAULT_TIMEOUT 100
RUN echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf

# add a repo that contains a backport of dh-virtualenv 1.1 for jammy, bionic
RUN apt-get update && \
apt-get install -y software-properties-common

# install dependencies
RUN apt-get update \
&& apt-get install -y \
libffi-dev \
libssl-dev \
debhelper \
gcc \
dh-python \
dh-virtualenv \
python3-all \
python3-all-dev \
python3-dev \
python3-pip \
python3-setuptools \
python3-venv \
python3-wheel \
python3-greenlet \
python3-gevent \
build-essential \
cmake \
devscripts \
equivs \
libevent-dev \
zlib1g-dev \
libssl-dev \
$EXTRA_PACKAGES

# Add entrypoint script
COPY packaging/docker-build/docker-entrypoint.sh ${WORKDIR}
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
36 changes: 36 additions & 0 deletions packaging/docker-build/Dockerfile-debian-12-tester
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2019 The Last Pickle Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#ARG EXTRA_PACKAGES="python-dev python-pip"
ARG BUILD_IMAGE=ubuntu:18.04
FROM ${BUILD_IMAGE}

ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_IMAGE
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# use a common app path, copied from python-onbuild:latest
ENV WORKDIR /usr/src/app
RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}

# # install dependencies
RUN apt-get update \
&& apt-get install -y \
python3 \
python3-venv \
$EXTRA_PACKAGES

# Add entrypoint script
COPY packaging/docker-build/docker-entrypoint-test.sh ${WORKDIR}
ENTRYPOINT ["/usr/src/app/docker-entrypoint-test.sh"]
35 changes: 35 additions & 0 deletions packaging/docker-build/Dockerfile-tester
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2019 The Last Pickle Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG BUILD_IMAGE=ubuntu:18.04
FROM ${BUILD_IMAGE}

ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_IMAGE
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# use a common app path, copied from python-onbuild:latest
ENV WORKDIR /usr/src/app
RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}

# install dependencies
RUN apt-get update \
&& apt-get install -y \
python3 \
python3-venv \
$EXTRA_PACKAGES

# Add entrypoint script
COPY packaging/docker-build/docker-entrypoint-test.sh ${WORKDIR}
ENTRYPOINT ["/usr/src/app/docker-entrypoint-test.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WORKDIR ${WORKDIR}
ENV PIP_DEFAULT_TIMEOUT 100
RUN echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf

# add a repo that contains a backport of dh-virtualenv 1.1 for focal, bionic
# add a repo that contains a backport of dh-virtualenv 1.1 for jammy, bionic
RUN apt-get update && \
apt-get install -y software-properties-common

Expand Down
Loading
Loading