Skip to content

Commit

Permalink
we generate ubuntu containers arm and x64 as debian 11, 12
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-christophe81 committed Jan 23, 2025
1 parent e1dd7a6 commit 702fe95
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG REGISTRY_URL
#ARG REGISTRY_URL

FROM ${REGISTRY_URL}/debian:bullseye
#FROM ${REGISTRY_URL}/debian:bullseye

FROM debian:bullseye

COPY . /tmp/collect

Expand All @@ -9,6 +11,7 @@ RUN bash -e <<EOF
apt-get update

apt-get -y install curl \
aptitude \
gcc \
g++ \
gdb \
Expand Down
11 changes: 8 additions & 3 deletions .github/docker/Dockerfile.centreon-collect-ubuntu-jammy
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG REGISTRY_URL
ARG TRIPLET

FROM ${REGISTRY_URL}/ubuntu:jammy

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive


RUN bash -e <<EOF

Expand Down Expand Up @@ -56,6 +58,10 @@ apt-get clean

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

if [ "${TRIPLET}" = "arm64-linux" ] ; then
export VCPKG_FORCE_SYSTEM_BINARIES=arm
fi

git clone --depth 1 -b 2024.01.12 https://github.com/Microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
mkdir /src
Expand All @@ -66,14 +72,13 @@ COPY vcpkg.json /src
COPY overlays /overlays
COPY custom-triplets /custom-triplets

ARG TRIPLET
RUN bash -e <<EOF

export VCPKG_ROOT=/vcpkg
export PATH=$VCPKG_ROOT:$PATH

if [ "${TRIPLET}" = "arm64-linux" ] ; then
export VCPKG_FORCE_SYSTEM_BINARIES=1
export VCPKG_FORCE_SYSTEM_BINARIES=arm
fi
vcpkg/vcpkg install --overlay-triplets=custom-triplets --triplet ${TRIPLET}-release --vcpkg-root vcpkg --x-wait-for-lock --x-manifest-root=/src --x-install-root=vcpkg_installed --overlay-ports=overlays

Expand Down
53 changes: 53 additions & 0 deletions .github/docker/Dockerfile.centreon-collect-ubuntu-jammy-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG REGISTRY_URL

FROM ${REGISTRY_URL}/ubuntu:jammy

#FROM ubuntu:jammy

ENV DEBIAN_FRONTEND=noninteractive

COPY . /tmp/collect

RUN bash -e <<EOF

apt-get update

apt-get install -y --no-install-recommends tzdata

apt-get -y install aptitude \
curl \
fakeroot \
gdb \
git \
git-buildpackage \
libgcrypt20 \
libgnutls30 \
libmariadb3 \
libperl-dev \
libssh2-1 \
locales \
mariadb-server \
openssl \
python3 \
python3-pip \
rrdtool \
strace \
sudo \
zip \
zstd \
perl-base

apt-get clean

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

pip3 install -U robotframework robotframework-databaselibrary robotframework-httpctrl robotframework-examples pymysql python-dateutil psutil
pip3 install grpcio grpcio_tools py-cpuinfo cython unqlite gitpython boto3 robotframework-requests

cd /tmp/collect

.github/scripts/collect-prepare-test-robot.sh mariadb

/bin/rm -rf /tmp/collect

EOF
23 changes: 19 additions & 4 deletions .github/workflows/docker-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ jobs:
dockerfile: centreon-collect-debian-bookworm-test
image: centreon-collect-debian-bookworm-test
tag: ${{ needs.get-environment.outputs.test_img_version }}
# - runner: collect
# dockerfile: centreon-collect-ubuntu-jammy
# image: centreon-collect-ubuntu-jammy
# tag: ${{ needs.get-environment.outputs.img_version }}
- runner: collect
dockerfile: centreon-collect-ubuntu-jammy
image: centreon-collect-ubuntu-jammy
tag: ${{ needs.get-environment.outputs.img_version }}
- runner: collect
dockerfile: centreon-collect-ubuntu-jammy-test
image: centreon-collect-ubuntu-jammy-test
tag: ${{ needs.get-environment.outputs.img_version }}
- runner: collect-arm64
dockerfile: centreon-collect-debian-bullseye
image: centreon-collect-debian-bullseye-arm64
Expand All @@ -89,6 +93,14 @@ jobs:
dockerfile: centreon-collect-debian-bookworm-test
image: centreon-collect-debian-bookworm-arm64-test
tag: ${{ needs.get-environment.outputs.test_img_version }}
- runner: collect-arm64
dockerfile: centreon-collect-ubuntu-jammy
image: centreon-collect-ubuntu-jammy-arm64
tag: ${{ needs.get-environment.outputs.img_version }}
- runner: collect-arm64
dockerfile: centreon-collect-ubuntu-jammy-test
image: centreon-collect-ubuntu-jammy-test-arm64
tag: ${{ needs.get-environment.outputs.img_version }}

runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.runner)) }}

Expand All @@ -113,6 +125,9 @@ jobs:
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}

- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
with:
endpoint: buildx-context
driver-opts: image=${{ vars.DOCKER_PROXY_REGISTRY_URL }}/moby/buildkit:buildx-stable-1

- name: Build image ${{ matrix.image }}:${{ matrix.tag }}
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
Expand Down

0 comments on commit 702fe95

Please sign in to comment.