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] Use cicd-docker-build-and-distribute.yml. #206

Merged
merged 1 commit into from
Apr 9, 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
95 changes: 95 additions & 0 deletions .github/docker/centos/7/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
ARG BUILDER_IMAGE=centos:7.2.1511

FROM ${BUILDER_IMAGE} AS builder

ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}
ENV MAINTAINER=${MAINTAINER}

RUN yum -y update && \
yum install -y \
audiofile-devel \
autoconf \
automake \
bind-license \
centos-release-scl \
cyrus-sasl-lib \
dbus \
dbus-libs \
devtoolset-9-gcc* \
dos2unix \
doxygen \
dpkg-dev \
dracut \
epel-release \
expat \
gcc \
gcc-c++ \
git \
glib2 \
glib2-devel \
gnupg2 \
gzip \
krb5-dxevel \
libatomic \
libcurl-devel \
libtool \
libuuid-devel \
libxml2 \
lksctp-tools-devel \
lsb_release \
make \
multilib-rpm-config \
openssl-devel \
pkg-config \
procps-ng \
python \
python-libs \
rpm-build \
rpmdevtools \
scl-utils \
sqlite \
swig \
unzip \
uuid-devel \
vim-minimal \
wget \
which \
xz \
xz-libs \
yum-plugin-fastestmirror \
yum-plugin-ovl \
yum-utils \
zlib-devel && \
yum -y clean all

ENV CMAKE_VERSION 3.22.2

RUN set -ex \
&& curl -kfsSLO --compressed https://cmake.org/files/v3.22/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \
&& curl -kfsSLO --compressed https://cmake.org/files/v3.22/cmake-${CMAKE_VERSION}-SHA-256.txt \
&& grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \
&& tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /usr/local --strip-components=1 --no-same-owner \
&& rm -rf cmake-${CMAKE_VERSION}* \
&& cmake --version

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}/
RUN cd ${DATA_DIR}/ && \
git reset --hard HEAD && git clean -xfd && \
cd ${DATA_DIR}

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.rpm OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
51 changes: 51 additions & 0 deletions .github/docker/debian/bookworm/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG BUILDER_IMAGE=debian:bookworm
ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

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

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

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

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

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

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

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

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

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

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

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

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

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
51 changes: 51 additions & 0 deletions .github/docker/debian/bullseye/arm32v7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG BUILDER_IMAGE=arm32v7/debian:bullseye
ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

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

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

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
51 changes: 51 additions & 0 deletions .github/docker/debian/buster/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG BUILDER_IMAGE=debian:buster
ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

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

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

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

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