Skip to content

Commit

Permalink
[GHA] Migrate to new project layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rj1k committed Sep 30, 2024
1 parent 51d3cf8 commit 9fd156a
Show file tree
Hide file tree
Showing 12 changed files with 435 additions and 589 deletions.
102 changes: 0 additions & 102 deletions .github/docker/centos/7/amd64/Dockerfile

This file was deleted.

78 changes: 50 additions & 28 deletions .github/docker/debian/bookworm/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
ARG BUILDER_IMAGE=debian:bookworm
ARG MAINTAINER="Andrey Volk <[email protected]>"
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

MAINTAINER ${MAINTAINER}
ARG DATA_DIR=/data

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

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

RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
Expand All @@ -22,6 +33,7 @@ RUN apt-get -q update && \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
graphviz \
libglib2.0-dev \
Expand All @@ -32,35 +44,45 @@ RUN apt-get -q update && \

RUN update-ca-certificates --fresh

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

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"

RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \
chmod +x ~/.env
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}

RUN git config --global --add safe.directory '*'
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
| tee -a ~/.env

# Bootstrap and Build
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
RUN . ~/.env && dch \
--controlmaint \
--distribution "${CODENAME}" \
--force-bad-version \
--force-distribution \
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
"Nightly build, ${GIT_SHA}"

RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
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 -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.

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
Expand Down
80 changes: 51 additions & 29 deletions .github/docker/debian/bookworm/arm32v7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
ARG BUILDER_IMAGE=arm32v7/debian:bookworm
ARG MAINTAINER="Andrey Volk <[email protected]>"
ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513

FROM ${BUILDER_IMAGE} AS builder
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

MAINTAINER ${MAINTAINER}
ARG DATA_DIR=/data

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

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

RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
Expand All @@ -22,6 +33,7 @@ RUN apt-get -q update && \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
graphviz \
libglib2.0-dev \
Expand All @@ -32,35 +44,45 @@ RUN apt-get -q update && \

RUN update-ca-certificates --fresh

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

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"

RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \
chmod +x ~/.env
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}

RUN git config --global --add safe.directory '*'
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
| tee -a ~/.env

# Bootstrap and Build
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
RUN . ~/.env && dch \
--controlmaint \
--distribution "${CODENAME}" \
--force-bad-version \
--force-distribution \
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
"Nightly build, ${GIT_SHA}"

RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
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 -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.

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
Expand Down
Loading

0 comments on commit 9fd156a

Please sign in to comment.