File tree 8 files changed +621
-0
lines changed
8 files changed +621
-0
lines changed Original file line number Diff line number Diff line change
1
+ ARG BUILDER_IMAGE=centos:7.2.1511
2
+
3
+ FROM ${BUILDER_IMAGE} AS builder
4
+
5
+ ARG MAINTAINER=
"Andrey Volk <[email protected] >"
6
+ ARG BUILD_NUMBER=42
7
+ ARG GIT_SHA=0000000000
8
+
9
+ MAINTAINER ${MAINTAINER}
10
+ ENV MAINTAINER=${MAINTAINER}
11
+
12
+ RUN yum -y update && \
13
+ yum install -y \
14
+ audiofile-devel \
15
+ autoconf \
16
+ automake \
17
+ bind-license \
18
+ centos-release-scl \
19
+ cyrus-sasl-lib \
20
+ dbus \
21
+ dbus-libs \
22
+ devtoolset-9-gcc* \
23
+ dos2unix \
24
+ doxygen \
25
+ dpkg-dev \
26
+ dracut \
27
+ epel-release \
28
+ expat \
29
+ gcc \
30
+ gcc-c++ \
31
+ git \
32
+ glib2 \
33
+ glib2-devel \
34
+ gnupg2 \
35
+ gzip \
36
+ krb5-dxevel \
37
+ libatomic \
38
+ libcurl-devel \
39
+ libtool \
40
+ libuuid-devel \
41
+ libxml2 \
42
+ lksctp-tools-devel \
43
+ lsb_release \
44
+ make \
45
+ multilib-rpm-config \
46
+ openssl-devel \
47
+ pkg-config \
48
+ procps-ng \
49
+ python \
50
+ python-libs \
51
+ rpm-build \
52
+ rpmdevtools \
53
+ scl-utils \
54
+ sqlite \
55
+ swig \
56
+ unzip \
57
+ uuid-devel \
58
+ vim-minimal \
59
+ wget \
60
+ which \
61
+ xz \
62
+ xz-libs \
63
+ yum-plugin-fastestmirror \
64
+ yum-plugin-ovl \
65
+ yum-utils \
66
+ zlib-devel && \
67
+ yum -y clean all
68
+
69
+ ENV DATA_DIR=/data
70
+ WORKDIR ${DATA_DIR}
71
+
72
+ COPY . ${DATA_DIR}/src/
73
+ RUN cd ${DATA_DIR}/src/ && \
74
+ git reset --hard HEAD && git clean -xfd && \
75
+ cd ${DATA_DIR}
76
+
77
+ ARG SPEC_FILE=spandsp
78
+
79
+ # Bootstrap and Build
80
+ RUN cat <<EOF > ~/.rpmmacros
81
+ %packager ${MAINTAINER}
82
+ %_topdir ${DATA_DIR}/rpmbuild
83
+ EOF
84
+ RUN rpmdev-setuptree
85
+
86
+ RUN echo "export VERSION=$(rpm -q --qf '%{VERSION}\n ' --specfile ${DATA_DIR}/src/${SPEC_FILE}.spec 2>/dev/null | head -1)" \
87
+ | tee ~/.env && \
88
+ chmod +x ~/.env
89
+
90
+ RUN . ~/.env && \
91
+ mv -v ${DATA_DIR}/src/ ${DATA_DIR}/${SPEC_FILE}-${VERSION}/ && \
92
+ tar cvzf ${DATA_DIR}/rpmbuild/SOURCES/${SPEC_FILE}-${VERSION}.tar.gz --exclude .git -C ${DATA_DIR} ${SPEC_FILE}-${VERSION}/ && \
93
+ cp -v ${DATA_DIR}/${SPEC_FILE}-${VERSION}/${SPEC_FILE}.spec ${DATA_DIR}/rpmbuild/SPECS/ && \
94
+ sed -i "s/\( Release:\)\( [[:space:]]*\) 1%{?dist}/\1\2 ${BUILD_NUMBER}.${GIT_SHA}/" ${DATA_DIR}/rpmbuild/SPECS/${SPEC_FILE}.spec
95
+
96
+ RUN rpmbuild -bs ${DATA_DIR}/rpmbuild/SPECS/${SPEC_FILE}.spec
97
+ RUN find ${DATA_DIR}/rpmbuild/SRPMS/ -type f | xargs -rI{} yum-builddep -y {}
98
+ RUN rpmbuild -ba ${DATA_DIR}/rpmbuild/SPECS/${SPEC_FILE}.spec
99
+
100
+ # Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101
+ FROM scratch
102
+ COPY --from=builder /data/rpmbuild/ /
Original file line number Diff line number Diff line change
1
+ ARG BUILDER_IMAGE=debian:bookworm
2
+ ARG MAINTAINER=
"Andrey Volk <[email protected] >"
3
+
4
+ FROM ${BUILDER_IMAGE} AS builder
5
+
6
+ ARG BUILD_NUMBER=42
7
+ ARG GIT_SHA=0000000000
8
+
9
+ MAINTAINER ${MAINTAINER}
10
+
11
+ SHELL ["/bin/bash" , "-c" ]
12
+
13
+ RUN apt-get -q update && \
14
+ DEBIAN_FRONTEND=noninteractive apt-get -yq install \
15
+ apt-transport-https \
16
+ build-essential \
17
+ ca-certificates \
18
+ cmake \
19
+ curl \
20
+ debhelper \
21
+ devscripts \
22
+ dh-autoreconf \
23
+ docbook-xsl \
24
+ dos2unix \
25
+ doxygen \
26
+ git \
27
+ graphviz \
28
+ libglib2.0-dev \
29
+ libssl-dev \
30
+ lsb-release \
31
+ pkg-config \
32
+ wget
33
+
34
+ RUN update-ca-certificates --fresh
35
+
36
+ ENV DATA_DIR=/data
37
+ WORKDIR ${DATA_DIR}
38
+
39
+ COPY . ${DATA_DIR}
40
+ RUN git reset --hard HEAD && git clean -xfd
41
+
42
+ RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n ')" | tee ~/.env && \
43
+ chmod +x ~/.env
44
+
45
+ RUN git config --global --add safe.directory '*'
46
+
47
+ # Bootstrap and Build
48
+ RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
49
+ RUN . ~/.env && dch \
50
+ --controlmaint \
51
+ --distribution "${CODENAME}" \
52
+ --force-bad-version \
53
+ --force-distribution \
54
+ --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
55
+ "Nightly build, ${GIT_SHA}"
56
+
57
+ RUN apt-get -q update && \
58
+ mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
59
+ apt-get -y -f install
60
+
61
+ ENV DEB_BUILD_OPTIONS="parallel=1"
62
+ RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
63
+ --force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
64
+ RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
65
+
66
+ # Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
67
+ FROM scratch
68
+ COPY --from=builder /data/OUT/ /
Original file line number Diff line number Diff line change
1
+ ARG BUILDER_IMAGE=arm32v7/debian:bookworm
2
+ ARG MAINTAINER=
"Andrey Volk <[email protected] >"
3
+
4
+ FROM ${BUILDER_IMAGE} AS builder
5
+
6
+ ARG BUILD_NUMBER=42
7
+ ARG GIT_SHA=0000000000
8
+
9
+ MAINTAINER ${MAINTAINER}
10
+
11
+ SHELL ["/bin/bash" , "-c" ]
12
+
13
+ RUN apt-get -q update && \
14
+ DEBIAN_FRONTEND=noninteractive apt-get -yq install \
15
+ apt-transport-https \
16
+ build-essential \
17
+ ca-certificates \
18
+ cmake \
19
+ curl \
20
+ debhelper \
21
+ devscripts \
22
+ dh-autoreconf \
23
+ docbook-xsl \
24
+ dos2unix \
25
+ doxygen \
26
+ git \
27
+ graphviz \
28
+ libglib2.0-dev \
29
+ libssl-dev \
30
+ lsb-release \
31
+ pkg-config \
32
+ wget
33
+
34
+ RUN update-ca-certificates --fresh
35
+
36
+ ENV DATA_DIR=/data
37
+ WORKDIR ${DATA_DIR}
38
+
39
+ COPY . ${DATA_DIR}
40
+ RUN git reset --hard HEAD && git clean -xfd
41
+
42
+ RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n ')" | tee ~/.env && \
43
+ chmod +x ~/.env
44
+
45
+ RUN git config --global --add safe.directory '*'
46
+
47
+ # Bootstrap and Build
48
+ RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
49
+ RUN . ~/.env && dch \
50
+ --controlmaint \
51
+ --distribution "${CODENAME}" \
52
+ --force-bad-version \
53
+ --force-distribution \
54
+ --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
55
+ "Nightly build, ${GIT_SHA}"
56
+
57
+ RUN apt-get -q update && \
58
+ mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
59
+ apt-get -y -f install
60
+
61
+ ENV DEB_BUILD_OPTIONS="parallel=1"
62
+ RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
63
+ --force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
64
+ RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
65
+
66
+ # Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
67
+ FROM scratch
68
+ COPY --from=builder /data/OUT/ /
Original file line number Diff line number Diff line change
1
+ ARG BUILDER_IMAGE=debian:bullseye
2
+ ARG MAINTAINER=
"Andrey Volk <[email protected] >"
3
+
4
+ FROM ${BUILDER_IMAGE} AS builder
5
+
6
+ ARG BUILD_NUMBER=42
7
+ ARG GIT_SHA=0000000000
8
+
9
+ MAINTAINER ${MAINTAINER}
10
+
11
+ SHELL ["/bin/bash" , "-c" ]
12
+
13
+ RUN apt-get -q update && \
14
+ DEBIAN_FRONTEND=noninteractive apt-get -yq install \
15
+ apt-transport-https \
16
+ build-essential \
17
+ ca-certificates \
18
+ cmake \
19
+ curl \
20
+ debhelper \
21
+ devscripts \
22
+ dh-autoreconf \
23
+ docbook-xsl \
24
+ dos2unix \
25
+ doxygen \
26
+ git \
27
+ graphviz \
28
+ libglib2.0-dev \
29
+ libssl-dev \
30
+ lsb-release \
31
+ pkg-config \
32
+ wget
33
+
34
+ RUN update-ca-certificates --fresh
35
+
36
+ ENV DATA_DIR=/data
37
+ WORKDIR ${DATA_DIR}
38
+
39
+ COPY . ${DATA_DIR}
40
+ RUN git reset --hard HEAD && git clean -xfd
41
+
42
+ RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n ')" | tee ~/.env && \
43
+ chmod +x ~/.env
44
+
45
+ RUN git config --global --add safe.directory '*'
46
+
47
+ # Bootstrap and Build
48
+ RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
49
+ RUN . ~/.env && dch \
50
+ --controlmaint \
51
+ --distribution "${CODENAME}" \
52
+ --force-bad-version \
53
+ --force-distribution \
54
+ --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
55
+ "Nightly build, ${GIT_SHA}"
56
+
57
+ RUN apt-get -q update && \
58
+ mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
59
+ apt-get -y -f install
60
+
61
+ ENV DEB_BUILD_OPTIONS="parallel=1"
62
+ RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
63
+ --force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
64
+ RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
65
+
66
+ # Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
67
+ FROM scratch
68
+ COPY --from=builder /data/OUT/ /
Original file line number Diff line number Diff line change
1
+ ARG BUILDER_IMAGE=arm32v7/debian:bullseye
2
+ ARG MAINTAINER=
"Andrey Volk <[email protected] >"
3
+
4
+ FROM ${BUILDER_IMAGE} AS builder
5
+
6
+ ARG BUILD_NUMBER=42
7
+ ARG GIT_SHA=0000000000
8
+
9
+ MAINTAINER ${MAINTAINER}
10
+
11
+ SHELL ["/bin/bash" , "-c" ]
12
+
13
+ RUN apt-get -q update && \
14
+ DEBIAN_FRONTEND=noninteractive apt-get -yq install \
15
+ apt-transport-https \
16
+ build-essential \
17
+ ca-certificates \
18
+ cmake \
19
+ curl \
20
+ debhelper \
21
+ devscripts \
22
+ dh-autoreconf \
23
+ docbook-xsl \
24
+ dos2unix \
25
+ doxygen \
26
+ git \
27
+ graphviz \
28
+ libglib2.0-dev \
29
+ libssl-dev \
30
+ lsb-release \
31
+ pkg-config \
32
+ wget
33
+
34
+ RUN update-ca-certificates --fresh
35
+
36
+ ENV DATA_DIR=/data
37
+ WORKDIR ${DATA_DIR}
38
+
39
+ COPY . ${DATA_DIR}
40
+ RUN git reset --hard HEAD && git clean -xfd
41
+
42
+ RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n ')" | tee ~/.env && \
43
+ chmod +x ~/.env
44
+
45
+ RUN git config --global --add safe.directory '*'
46
+
47
+ # Bootstrap and Build
48
+ RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
49
+ RUN . ~/.env && dch \
50
+ --controlmaint \
51
+ --distribution "${CODENAME}" \
52
+ --force-bad-version \
53
+ --force-distribution \
54
+ --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
55
+ "Nightly build, ${GIT_SHA}"
56
+
57
+ RUN apt-get -q update && \
58
+ mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
59
+ apt-get -y -f install
60
+
61
+ ENV DEB_BUILD_OPTIONS="parallel=1"
62
+ RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
63
+ --force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
64
+ RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
65
+
66
+ # Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
67
+ FROM scratch
68
+ COPY --from=builder /data/OUT/ /
You can’t perform that action at this time.
0 commit comments