Skip to content

Commit d4827d7

Browse files
committed
WiP: [GHA] Add trixie build target
1 parent 114af2e commit d4827d7

File tree

7 files changed

+509
-4
lines changed

7 files changed

+509
-4
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
ARG BUILDER_IMAGE=debian:trixie-20250520
2+
3+
FROM ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
6+
7+
ARG BUILD_NUMBER=42
8+
ARG GIT_SHA=0000000000
9+
10+
ARG DATA_DIR=/data
11+
ARG CODENAME=trixie
12+
13+
LABEL org.opencontainers.image.authors="${MAINTAINER_EMAIL}"
14+
15+
SHELL ["/bin/bash", "-c"]
16+
17+
RUN apt-get -q update && \
18+
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
19+
apt-transport-https \
20+
build-essential \
21+
ca-certificates \
22+
cmake \
23+
curl \
24+
debhelper \
25+
devscripts \
26+
dh-autoreconf \
27+
dos2unix \
28+
doxygen \
29+
git \
30+
graphviz \
31+
libglib2.0-dev \
32+
libssl-dev \
33+
lsb-release \
34+
pkg-config \
35+
wget
36+
37+
RUN update-ca-certificates --fresh
38+
39+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
40+
chmod +x ~/.env
41+
42+
RUN git config --global --add safe.directory '*' \
43+
&& git config --global user.name "${MAINTAINER_NAME}" \
44+
&& git config --global user.email "${MAINTAINER_EMAIL}"
45+
46+
# Bootstrap and Build
47+
COPY . ${DATA_DIR}
48+
WORKDIR ${DATA_DIR}
49+
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
50+
51+
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
52+
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
53+
54+
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
55+
sha512sum /run/secrets/REPO_PASSWORD && \
56+
curl -sSL https://freeswitch.org/fsget | \
57+
bash -s $(cat /run/secrets/REPO_PASSWORD) release && \
58+
apt-get --quiet update && \
59+
mk-build-deps \
60+
--install \
61+
--remove debian/control \
62+
--tool "apt-get --yes --no-install-recommends" && \
63+
apt-get --yes --fix-broken install && \
64+
rm -f /etc/apt/auth.conf
65+
66+
ENV DEB_BUILD_OPTIONS="parallel=1"
67+
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
68+
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
69+
70+
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
71+
72+
RUN dpkg-source \
73+
--diff-ignore=.* \
74+
--compression=xz \
75+
--compression-level=9 \
76+
--build \
77+
. \
78+
&& debuild -b -us -uc \
79+
&& mkdir OUT \
80+
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
81+
82+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
83+
FROM scratch
84+
COPY --from=builder /data/OUT/ /
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
ARG BUILDER_IMAGE=debian:trixie-20250520
2+
3+
FROM ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
6+
7+
ARG BUILD_NUMBER=42
8+
ARG GIT_SHA=0000000000
9+
10+
ARG DATA_DIR=/data
11+
ARG CODENAME=trixie
12+
13+
LABEL org.opencontainers.image.authors="${MAINTAINER_EMAIL}"
14+
15+
SHELL ["/bin/bash", "-c"]
16+
17+
RUN apt-get -q update && \
18+
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
19+
apt-transport-https \
20+
build-essential \
21+
ca-certificates \
22+
cmake \
23+
curl \
24+
debhelper \
25+
devscripts \
26+
dh-autoreconf \
27+
dos2unix \
28+
doxygen \
29+
git \
30+
graphviz \
31+
libglib2.0-dev \
32+
libssl-dev \
33+
lsb-release \
34+
pkg-config \
35+
wget
36+
37+
RUN update-ca-certificates --fresh
38+
39+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
40+
chmod +x ~/.env
41+
42+
RUN git config --global --add safe.directory '*' \
43+
&& git config --global user.name "${MAINTAINER_NAME}" \
44+
&& git config --global user.email "${MAINTAINER_EMAIL}"
45+
46+
# Bootstrap and Build
47+
COPY . ${DATA_DIR}
48+
WORKDIR ${DATA_DIR}
49+
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
50+
51+
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
52+
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
53+
54+
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
55+
sha512sum /run/secrets/REPO_PASSWORD && \
56+
curl -sSL https://freeswitch.org/fsget | \
57+
bash -s $(cat /run/secrets/REPO_PASSWORD) prerelease && \
58+
apt-get --quiet update && \
59+
mk-build-deps \
60+
--install \
61+
--remove debian/control \
62+
--tool "apt-get --yes --no-install-recommends" && \
63+
apt-get --yes --fix-broken install && \
64+
rm -f /etc/apt/auth.conf
65+
66+
ENV DEB_BUILD_OPTIONS="parallel=1"
67+
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
68+
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
69+
70+
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
71+
72+
RUN dpkg-source \
73+
--diff-ignore=.* \
74+
--compression=xz \
75+
--compression-level=9 \
76+
--build \
77+
. \
78+
&& debuild -b -us -uc \
79+
&& mkdir OUT \
80+
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
81+
82+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
83+
FROM scratch
84+
COPY --from=builder /data/OUT/ /
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
ARG BUILDER_IMAGE=arm32v7/debian:trixie-20250520
2+
3+
FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
6+
7+
ARG BUILD_NUMBER=42
8+
ARG GIT_SHA=0000000000
9+
10+
ARG DATA_DIR=/data
11+
ARG CODENAME=trixie
12+
13+
LABEL org.opencontainers.image.authors="${MAINTAINER_EMAIL}"
14+
15+
SHELL ["/bin/bash", "-c"]
16+
17+
RUN apt-get -q update && \
18+
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
19+
apt-transport-https \
20+
build-essential \
21+
ca-certificates \
22+
cmake \
23+
curl \
24+
debhelper \
25+
devscripts \
26+
dh-autoreconf \
27+
dos2unix \
28+
doxygen \
29+
git \
30+
graphviz \
31+
libglib2.0-dev \
32+
libssl-dev \
33+
lsb-release \
34+
pkg-config \
35+
wget
36+
37+
RUN update-ca-certificates --fresh
38+
39+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
40+
chmod +x ~/.env
41+
42+
RUN git config --global --add safe.directory '*' \
43+
&& git config --global user.name "${MAINTAINER_NAME}" \
44+
&& git config --global user.email "${MAINTAINER_EMAIL}"
45+
46+
# Bootstrap and Build
47+
COPY . ${DATA_DIR}
48+
WORKDIR ${DATA_DIR}
49+
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
50+
51+
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
52+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
53+
54+
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
55+
sha512sum /run/secrets/REPO_PASSWORD && \
56+
curl -sSL https://freeswitch.org/fsget | \
57+
bash -s $(cat /run/secrets/REPO_PASSWORD) release && \
58+
apt-get --quiet update && \
59+
mk-build-deps \
60+
--install \
61+
--remove debian/control \
62+
--tool "apt-get --yes --no-install-recommends" && \
63+
apt-get --yes --fix-broken install && \
64+
rm -f /etc/apt/auth.conf
65+
66+
ENV DEB_BUILD_OPTIONS="parallel=1"
67+
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
68+
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
69+
70+
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
71+
72+
RUN dpkg-source \
73+
--diff-ignore=.* \
74+
--compression=xz \
75+
--compression-level=9 \
76+
--build \
77+
. \
78+
&& debuild -b -us -uc \
79+
&& mkdir OUT \
80+
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
81+
82+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
83+
FROM scratch
84+
COPY --from=builder /data/OUT/ /
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
ARG BUILDER_IMAGE=arm32v7/debian:trixie-20250520
2+
3+
FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
6+
7+
ARG BUILD_NUMBER=42
8+
ARG GIT_SHA=0000000000
9+
10+
ARG DATA_DIR=/data
11+
ARG CODENAME=trixie
12+
13+
LABEL org.opencontainers.image.authors="${MAINTAINER_EMAIL}"
14+
15+
SHELL ["/bin/bash", "-c"]
16+
17+
RUN apt-get -q update && \
18+
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
19+
apt-transport-https \
20+
build-essential \
21+
ca-certificates \
22+
cmake \
23+
curl \
24+
debhelper \
25+
devscripts \
26+
dh-autoreconf \
27+
dos2unix \
28+
doxygen \
29+
git \
30+
graphviz \
31+
libglib2.0-dev \
32+
libssl-dev \
33+
lsb-release \
34+
pkg-config \
35+
wget
36+
37+
RUN update-ca-certificates --fresh
38+
39+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
40+
chmod +x ~/.env
41+
42+
RUN git config --global --add safe.directory '*' \
43+
&& git config --global user.name "${MAINTAINER_NAME}" \
44+
&& git config --global user.email "${MAINTAINER_EMAIL}"
45+
46+
# Bootstrap and Build
47+
COPY . ${DATA_DIR}
48+
WORKDIR ${DATA_DIR}
49+
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
50+
51+
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
52+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
53+
54+
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
55+
sha512sum /run/secrets/REPO_PASSWORD && \
56+
curl -sSL https://freeswitch.org/fsget | \
57+
bash -s $(cat /run/secrets/REPO_PASSWORD) prerelease && \
58+
apt-get --quiet update && \
59+
mk-build-deps \
60+
--install \
61+
--remove debian/control \
62+
--tool "apt-get --yes --no-install-recommends" && \
63+
apt-get --yes --fix-broken install && \
64+
rm -f /etc/apt/auth.conf
65+
66+
ENV DEB_BUILD_OPTIONS="parallel=1"
67+
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
68+
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
69+
70+
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
71+
72+
RUN dpkg-source \
73+
--diff-ignore=.* \
74+
--compression=xz \
75+
--compression-level=9 \
76+
--build \
77+
. \
78+
&& debuild -b -us -uc \
79+
&& mkdir OUT \
80+
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
81+
82+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
83+
FROM scratch
84+
COPY --from=builder /data/OUT/ /

0 commit comments

Comments
 (0)