diff --git a/.github/docker/centos/7/amd64/Dockerfile b/.github/docker/centos/7/amd64/Dockerfile deleted file mode 100644 index 43eef99..0000000 --- a/.github/docker/centos/7/amd64/Dockerfile +++ /dev/null @@ -1,102 +0,0 @@ -ARG BUILDER_IMAGE=centos:7.2.1511 - -FROM ${BUILDER_IMAGE} AS builder - -ARG MAINTAINER="Andrey Volk " -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 DATA_DIR=/data -WORKDIR ${DATA_DIR} - -COPY . ${DATA_DIR}/src/ -RUN cd ${DATA_DIR}/src/ && \ - git reset --hard HEAD && git clean -xfd && \ - cd ${DATA_DIR} - -ARG SPEC_FILE=broadvoice - -# Bootstrap and Build -RUN cat < ~/.rpmmacros -%packager ${MAINTAINER} -%_topdir ${DATA_DIR}/rpmbuild -EOF -RUN rpmdev-setuptree - -RUN echo "export VERSION=$(rpm -q --qf '%{VERSION}\n' --specfile ${DATA_DIR}/src/${SPEC_FILE}.spec 2>/dev/null | head -1)" \ - | tee ~/.env && \ - chmod +x ~/.env - -RUN . ~/.env && \ - mv -v ${DATA_DIR}/src/ ${DATA_DIR}/${SPEC_FILE}-${VERSION}/ && \ - tar cvzf ${DATA_DIR}/rpmbuild/SOURCES/${SPEC_FILE}-${VERSION}.tar.gz --exclude .git -C ${DATA_DIR} ${SPEC_FILE}-${VERSION}/ && \ - cp -v ${DATA_DIR}/${SPEC_FILE}-${VERSION}/${SPEC_FILE}.spec ${DATA_DIR}/rpmbuild/SPECS/ && \ - sed -i "s/\(Release:\)\([[:space:]]*\)1%{?dist}/\1\2${BUILD_NUMBER}.${GIT_SHA}/" ${DATA_DIR}/rpmbuild/SPECS/${SPEC_FILE}.spec - -RUN rpmbuild -bs ${DATA_DIR}/rpmbuild/SPECS/${SPEC_FILE}.spec -RUN find ${DATA_DIR}/rpmbuild/SRPMS/ -type f | xargs -rI{} yum-builddep -y {} -RUN rpmbuild -ba ${DATA_DIR}/rpmbuild/SPECS/${SPEC_FILE}.spec - -# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) -FROM scratch -COPY --from=builder /data/rpmbuild/ / diff --git a/.github/docker/debian/bookworm/amd64/Dockerfile b/.github/docker/debian/bookworm/amd64/Dockerfile index 6330fb8..e0b26c9 100644 --- a/.github/docker/debian/bookworm/amd64/Dockerfile +++ b/.github/docker/debian/bookworm/amd64/Dockerfile @@ -1,18 +1,29 @@ -ARG BUILDER_IMAGE=debian:bookworm -ARG MAINTAINER="Andrey Volk " +ARG BUILDER_IMAGE=debian:bookworm-20240513 FROM ${BUILDER_IMAGE} AS builder +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +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 \ @@ -22,6 +33,7 @@ RUN apt-get -q update && \ dh-autoreconf \ dos2unix \ doxygen \ + dpkg-dev \ git \ graphviz \ libglib2.0-dev \ @@ -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 diff --git a/.github/docker/debian/bookworm/arm32v7/Dockerfile b/.github/docker/debian/bookworm/arm32v7/Dockerfile index 65c4f7d..a9ee852 100644 --- a/.github/docker/debian/bookworm/arm32v7/Dockerfile +++ b/.github/docker/debian/bookworm/arm32v7/Dockerfile @@ -1,18 +1,29 @@ -ARG BUILDER_IMAGE=arm32v7/debian:bookworm -ARG MAINTAINER="Andrey Volk " +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="andrey@signalwire.com" + +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 \ @@ -22,6 +33,7 @@ RUN apt-get -q update && \ dh-autoreconf \ dos2unix \ doxygen \ + dpkg-dev \ git \ graphviz \ libglib2.0-dev \ @@ -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 diff --git a/.github/docker/debian/bookworm/arm64v8/Dockerfile b/.github/docker/debian/bookworm/arm64v8/Dockerfile index 5d85e71..6a50691 100644 --- a/.github/docker/debian/bookworm/arm64v8/Dockerfile +++ b/.github/docker/debian/bookworm/arm64v8/Dockerfile @@ -1,18 +1,29 @@ -ARG BUILDER_IMAGE=arm64v8/debian:bookworm -ARG MAINTAINER="Andrey Volk " +ARG BUILDER_IMAGE=arm64v8/debian:bookworm-20240513 -FROM ${BUILDER_IMAGE} AS builder +FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bookworm +ARG ARCH=arm64 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 \ @@ -22,6 +33,7 @@ RUN apt-get -q update && \ dh-autoreconf \ dos2unix \ doxygen \ + dpkg-dev \ git \ graphviz \ libglib2.0-dev \ @@ -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 diff --git a/.github/docker/debian/bullseye/amd64/Dockerfile b/.github/docker/debian/bullseye/amd64/Dockerfile index d011b44..20617c3 100644 --- a/.github/docker/debian/bullseye/amd64/Dockerfile +++ b/.github/docker/debian/bullseye/amd64/Dockerfile @@ -1,18 +1,29 @@ -ARG BUILDER_IMAGE=debian:bullseye -ARG MAINTAINER="Andrey Volk " +ARG BUILDER_IMAGE=debian:bullseye-20240513 FROM ${BUILDER_IMAGE} AS builder +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +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 \ @@ -22,6 +33,7 @@ RUN apt-get -q update && \ dh-autoreconf \ dos2unix \ doxygen \ + dpkg-dev \ git \ graphviz \ libglib2.0-dev \ @@ -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 diff --git a/.github/docker/debian/bullseye/arm32v7/Dockerfile b/.github/docker/debian/bullseye/arm32v7/Dockerfile index 2d96b53..3647feb 100644 --- a/.github/docker/debian/bullseye/arm32v7/Dockerfile +++ b/.github/docker/debian/bullseye/arm32v7/Dockerfile @@ -1,18 +1,29 @@ -ARG BUILDER_IMAGE=arm32v7/debian:bullseye -ARG MAINTAINER="Andrey Volk " +ARG BUILDER_IMAGE=arm32v7/debian:bullseye-20240513 -FROM ${BUILDER_IMAGE} AS builder +FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +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 \ @@ -22,6 +33,7 @@ RUN apt-get -q update && \ dh-autoreconf \ dos2unix \ doxygen \ + dpkg-dev \ git \ graphviz \ libglib2.0-dev \ @@ -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 diff --git a/.github/docker/debian/bullseye/arm64v8/Dockerfile b/.github/docker/debian/bullseye/arm64v8/Dockerfile index 0eab042..c6feadc 100644 --- a/.github/docker/debian/bullseye/arm64v8/Dockerfile +++ b/.github/docker/debian/bullseye/arm64v8/Dockerfile @@ -1,18 +1,29 @@ -ARG BUILDER_IMAGE=arm64v8/debian:bullseye -ARG MAINTAINER="Andrey Volk " +ARG BUILDER_IMAGE=arm64v8/debian:bullseye-20240513 -FROM ${BUILDER_IMAGE} AS builder +FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=bullseye +ARG ARCH=arm64 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 \ @@ -22,6 +33,7 @@ RUN apt-get -q update && \ dh-autoreconf \ dos2unix \ doxygen \ + dpkg-dev \ git \ graphviz \ libglib2.0-dev \ @@ -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 diff --git a/.github/docker/debian/buster/amd64/Dockerfile b/.github/docker/debian/buster/amd64/Dockerfile deleted file mode 100644 index bd2a115..0000000 --- a/.github/docker/debian/buster/amd64/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -ARG BUILDER_IMAGE=debian:buster -ARG MAINTAINER="Andrey Volk " - -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 echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \ - chmod +x ~/.env - -RUN git config --global --add safe.directory '*' - -# 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 - -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/. - -# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) -FROM scratch -COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/buster/arm32v7/Dockerfile b/.github/docker/debian/buster/arm32v7/Dockerfile deleted file mode 100644 index ec51549..0000000 --- a/.github/docker/debian/buster/arm32v7/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -ARG BUILDER_IMAGE=arm32v7/debian:buster -ARG MAINTAINER="Andrey Volk " - -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 echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \ - chmod +x ~/.env - -RUN git config --global --add safe.directory '*' - -# 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 - -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/. - -# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) -FROM scratch -COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/buster/arm64v8/Dockerfile b/.github/docker/debian/buster/arm64v8/Dockerfile deleted file mode 100644 index b0ec71e..0000000 --- a/.github/docker/debian/buster/arm64v8/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -ARG BUILDER_IMAGE=arm64v8/debian:buster -ARG MAINTAINER="Andrey Volk " - -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 echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \ - chmod +x ~/.env - -RUN git config --global --add safe.directory '*' - -# 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 - -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/. - -# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) -FROM scratch -COPY --from=builder /data/OUT/ / diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..82457cb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,131 @@ +name: Build and Distribute + +on: + pull_request: + push: + branches: + - master + paths: + - "**" + workflow_dispatch: + +concurrency: + group: ${{ github.head_ref || github.ref }} + +jobs: + deb: + name: 'DEB' + permissions: + id-token: write + contents: read + uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main + strategy: + # max-parallel: 1 + fail-fast: false + matrix: + os: + - debian + version: + - bookworm + - bullseye + platform: + - name: amd64 + runner: ubuntu-latest + - name: arm32v7 + runner: ubuntu-latest + - name: arm64v8 + runner: ubuntu-latest + with: + RUNNER: ${{ matrix.platform.runner }} + ARTIFACTS_PATTERN: '.*\.(deb)$' + DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile + MAINTAINER: 'Andrey Volk ' + META_FILE_PATH_PREFIX: /var/www/libbroadvoice/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} + PLATFORM: ${{ matrix.platform.name }} + TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-unstable-artifact + UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' }} + secrets: + GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} + HOSTNAME: ${{ secrets.HOSTNAME }} + PROXY_URL: ${{ secrets.PROXY_URL }} + USERNAME: ${{ secrets.USERNAME }} + TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} + + deb-mirror: + name: 'DEB-MIRROR' + if: ${{ github.event_name != 'pull_request' }} + needs: + - deb + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + strategy: + # max-parallel: 1 + fail-fast: false + matrix: + os: + - debian + version: + - bookworm + - bullseye + platform: + - name: amd64 + runner: ubuntu-latest + - name: arm32v7 + runner: ubuntu-latest + - name: arm64v8 + runner: ubuntu-latest + release: + - release + - unstable + steps: + - name: Checkout reusable actions + uses: actions/checkout@v4 + with: + repository: signalwire/actions-template + ref: main + fetch-depth: 1 + path: actions + sparse-checkout: | + .github/actions/teleport-local-copy/action.yml + sparse-checkout-cone-mode: false + + - name: Mirror artifacts on remote server behind Teleport (public) + uses: ./actions/.github/actions/teleport-local-copy + with: + SRC: '/var/www/libbroadvoice/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-unstable-artifact.tar.gz' + DST: '/var/www/libbroadvoice/public/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-${{ matrix.release }}-artifact.tar.gz' + env: + HOSTNAME: ${{ secrets.HOSTNAME }} + PROXY_URL: ${{ secrets.PROXY_URL }} + TOKEN: ${{ secrets.TELEPORT_TOKEN }} + USERNAME: ${{ secrets.USERNAME }} + + - name: Mirror artifacts on remote server behind Teleport (fsa) + uses: ./actions/.github/actions/teleport-local-copy + with: + SRC: '/var/www/libbroadvoice/public/unstable/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-unstable-artifact.tar.gz' + DST: '/var/www/libbroadvoice/fsa/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-fsa-${{ matrix.release }}-artifact.tar.gz' + env: + HOSTNAME: ${{ secrets.HOSTNAME }} + PROXY_URL: ${{ secrets.PROXY_URL }} + TOKEN: ${{ secrets.TELEPORT_TOKEN }} + USERNAME: ${{ secrets.USERNAME }} + + meta: + name: 'Publish build data to meta-repo' + if: ${{ github.event_name != 'pull_request' }} + needs: + - deb + - deb-mirror + permissions: + id-token: write + contents: read + uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main + with: + META_CONTENT: '/var/www/libbroadvoice/{fsa,public}/{release,unstable}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}' + META_REPO: signalwire/bamboo_gha_trigger + META_REPO_BRANCH: trigger/libbroadvoice/${{ github.ref_name }} + secrets: + GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml deleted file mode 100644 index 651c249..0000000 --- a/.github/workflows/cicd.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: Build and Distribute - -on: - pull_request: - push: - branches: - - release - - master - paths: - - "**" - workflow_dispatch: - -concurrency: - group: ${{ github.head_ref || github.ref }} - -jobs: - deb: - name: 'DEB' - permissions: - id-token: write - contents: read - uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main - strategy: - # max-parallel: 1 - fail-fast: false - matrix: - os: - - debian - version: - - bookworm - - bullseye - - buster - platform: - - name: amd64 - runner: ubuntu-latest - - name: arm32v7 - runner: ubuntu-latest - - name: arm64v8 - runner: ubuntu-latest - # exclude: - # - version: bookworm - # platform: - # name: arm32v7 - with: - RUNNER: ${{ matrix.platform.runner }} - ARTIFACTS_PATTERN: '.*\.(deb)$' - DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile - MAINTAINER: 'Andrey Volk ' - META_FILE_PATH_PREFIX: /var/www/libbroadvoice/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} - PLATFORM: ${{ matrix.platform.name }} - # REPO_DOMAIN: freeswitch.signalwire.com - TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact - UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} - secrets: - GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} - HOSTNAME: ${{ secrets.HOSTNAME }} - PROXY_URL: ${{ secrets.PROXY_URL }} - USERNAME: ${{ secrets.USERNAME }} - TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} - # REPO_USERNAME: 'signalwire' - # REPO_PASSWORD: ${{ secrets.REPOTOKEN }} - - rpm: - name: 'RPM' - permissions: - id-token: write - contents: read - uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main - strategy: - # max-parallel: 1 - fail-fast: false - matrix: - os: - - centos - version: - - 7 - platform: - - name: amd64 - runner: ubuntu-latest - with: - RUNNER: ${{ matrix.platform.runner }} - ARTIFACTS_PATTERN: '.*\.(rpm)$' - DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile - MAINTAINER: 'Andrey Volk ' - META_FILE_PATH_PREFIX: /var/www/libbroadvoice/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} - PLATFORM: ${{ matrix.platform.name }} - # REPO_DOMAIN: freeswitch.signalwire.com - TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact - UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} - secrets: - GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} - HOSTNAME: ${{ secrets.HOSTNAME }} - PROXY_URL: ${{ secrets.PROXY_URL }} - USERNAME: ${{ secrets.USERNAME }} - TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} - # REPO_USERNAME: ${{ secrets.FSAUSER }} - # REPO_PASSWORD: ${{ secrets.FSAPASS }} - - meta: - name: 'Publish build data to meta-repo' - if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} - needs: - - deb - - rpm - permissions: - id-token: write - contents: read - uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main - with: - META_CONTENT: '/var/www/libbroadvoice/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}' - META_REPO: signalwire/bamboo_gha_trigger - META_REPO_BRANCH: trigger/libbroadvoice/${{ github.ref_name }} - secrets: - GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}