Skip to content

Commit 02485c4

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

File tree

7 files changed

+533
-4
lines changed

7 files changed

+533
-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="[email protected]"
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="[email protected]"
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="[email protected]"
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: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
ARG BUILDER_IMAGE=arm32v7/debian:trixie-20250520
2+
3+
FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_EMAIL="[email protected]"
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 . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
43+
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
44+
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
45+
EOF
46+
47+
RUN git config --global --add safe.directory '*' \
48+
&& git config --global user.name "${MAINTAINER_NAME}" \
49+
&& git config --global user.email "${MAINTAINER_EMAIL}"
50+
51+
# Bootstrap and Build
52+
COPY . ${DATA_DIR}
53+
WORKDIR ${DATA_DIR}
54+
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
55+
56+
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
57+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
58+
59+
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
60+
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
61+
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
62+
printf "password " >> /etc/apt/auth.conf && \
63+
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
64+
sha512sum /run/secrets/REPO_PASSWORD && \
65+
curl \
66+
--fail \
67+
--netrc-file /etc/apt/auth.conf \
68+
--output ${GPG_KEY} \
69+
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
70+
file ${GPG_KEY} && \
71+
apt-get --quiet update && \
72+
mk-build-deps \
73+
--install \
74+
--remove debian/control \
75+
--tool "apt-get --yes --no-install-recommends" && \
76+
apt-get --yes --fix-broken install && \
77+
rm -f /etc/apt/auth.conf
78+
79+
ENV DEB_BUILD_OPTIONS="parallel=1"
80+
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
81+
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
82+
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
83+
84+
RUN dpkg-source \
85+
--diff-ignore=.* \
86+
--compression=xz \
87+
--compression-level=9 \
88+
--build \
89+
. \
90+
&& debuild -b -us -uc \
91+
&& mkdir OUT \
92+
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
93+
94+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
95+
FROM scratch
96+
COPY --from=builder /data/OUT/ /

0 commit comments

Comments
 (0)