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

[GHA] Migrate to new project layout. #1

Merged
merged 1 commit into from
Oct 1, 2024
Merged
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
89 changes: 89 additions & 0 deletions .github/docker/debian/bookworm/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
ARG BUILDER_IMAGE=debian:bookworm-20240513

FROM ${BUILDER_IMAGE} AS builder

ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="[email protected]"

ARG CODENAME=bookworm
ARG ARCH=amd64

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

ARG DATA_DIR=/data

LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"

SHELL ["/bin/bash", "-c"]

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
&& chmod +x ~/.env

RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"

# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}

RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
| tee -a ~/.env

RUN apt-get -q update \
&& mk-build-deps \
--install \
--remove debian/control \
--tool "apt-get -y --no-install-recommends" \
&& apt-get -y -f install

ENV DEB_BUILD_OPTIONS="parallel=1"

RUN . ~/.env \
&& dch \
--controlmaint \
--distribution "${CODENAME}" \
--force-bad-version \
--force-distribution \
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
"Nightly build, ${GIT_SHA}" \
&& debuild \
--no-tgz-check \
--build=binary \
--unsigned-source \
--unsigned-changes \
&& mkdir OUT \
&& mv -v ../*.{deb,changes} OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
89 changes: 89 additions & 0 deletions .github/docker/debian/bookworm/arm32v7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513

FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder

ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="[email protected]"

ARG CODENAME=bookworm
ARG ARCH=arm32

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

ARG DATA_DIR=/data

LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"

SHELL ["/bin/bash", "-c"]

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
&& chmod +x ~/.env

RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"

# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}

RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
| tee -a ~/.env

RUN apt-get -q update \
&& mk-build-deps \
--install \
--remove debian/control \
--tool "apt-get -y --no-install-recommends" \
&& apt-get -y -f install

ENV DEB_BUILD_OPTIONS="parallel=1"

RUN . ~/.env \
&& dch \
--controlmaint \
--distribution "${CODENAME}" \
--force-bad-version \
--force-distribution \
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
"Nightly build, ${GIT_SHA}" \
&& debuild \
--no-tgz-check \
--build=binary \
--unsigned-source \
--unsigned-changes \
&& mkdir OUT \
&& mv -v ../*.{deb,changes} OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
89 changes: 89 additions & 0 deletions .github/docker/debian/bookworm/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
ARG BUILDER_IMAGE=arm64v8/debian:bookworm-20240513

FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder

ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="[email protected]"

ARG CODENAME=bookworm
ARG ARCH=arm64

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

ARG DATA_DIR=/data

LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"

SHELL ["/bin/bash", "-c"]

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
&& chmod +x ~/.env

RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"

# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}

RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
| tee -a ~/.env

RUN apt-get -q update \
&& mk-build-deps \
--install \
--remove debian/control \
--tool "apt-get -y --no-install-recommends" \
&& apt-get -y -f install

ENV DEB_BUILD_OPTIONS="parallel=1"

RUN . ~/.env \
&& dch \
--controlmaint \
--distribution "${CODENAME}" \
--force-bad-version \
--force-distribution \
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
"Nightly build, ${GIT_SHA}" \
&& debuild \
--no-tgz-check \
--build=binary \
--unsigned-source \
--unsigned-changes \
&& mkdir OUT \
&& mv -v ../*.{deb,changes} OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
89 changes: 89 additions & 0 deletions .github/docker/debian/bullseye/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
ARG BUILDER_IMAGE=debian:bullseye-20240513

FROM ${BUILDER_IMAGE} AS builder

ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="[email protected]"

ARG CODENAME=bullseye
ARG ARCH=amd64

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

ARG DATA_DIR=/data

LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"

SHELL ["/bin/bash", "-c"]

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
&& chmod +x ~/.env

RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"

# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}

RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
| tee -a ~/.env

RUN apt-get -q update \
&& mk-build-deps \
--install \
--remove debian/control \
--tool "apt-get -y --no-install-recommends" \
&& apt-get -y -f install

ENV DEB_BUILD_OPTIONS="parallel=1"

RUN . ~/.env \
&& dch \
--controlmaint \
--distribution "${CODENAME}" \
--force-bad-version \
--force-distribution \
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
"Nightly build, ${GIT_SHA}" \
&& debuild \
--no-tgz-check \
--build=binary \
--unsigned-source \
--unsigned-changes \
&& mkdir OUT \
&& mv -v ../*.{deb,changes} OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
Loading