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

Ci/debian trixie #2246

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/kagome-builder-deb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

name: Kagome Builder | Debian (Bookworm)
name: Kagome Builder | Debian (trixie)

on:
# schedule:
Expand Down
6 changes: 3 additions & 3 deletions housekeeping/docker/kagome-dev/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shared Environment Variables
# bookworm (Debian 12)
MINIDEB_IMAGE ?= bitnami/minideb@sha256:6cc3baf349947d587a9cd4971e81ff3ffc0d17382f2b5b6de63d6542bff10c16
# trixie (Debian 13)
MINIDEB_IMAGE ?= debian:trixie-slim@sha256:c63174f799a74411a0290f25086fdc5dc939aa1f8971a16ad6fb1b7658a25126
## DOCKER_REGISTRY_PATH empty for local usage
DOCKER_REGISTRY_PATH ?=
DOCKERHUB_REGISTRY_PATH ?= qdrvm/kagome
Expand All @@ -13,7 +13,7 @@ PACKAGE_ARCHITECTURE ?= amd64
BUILD_TYPE ?= Release

# Generated versions
MINIDEB_HASH := $(subst bitnami/minideb@sha256:,,$(MINIDEB_IMAGE))
MINIDEB_HASH := $(subst debian:trixie-slim@sha256:,,$(MINIDEB_IMAGE))
MINIDEB_SHORT_HASH := $(shell echo $(MINIDEB_HASH) | cut -c1-7)
MINIDEB_TAG = $(MINIDEB_SHORT_HASH)_rust-$(RUST_VERSION)

Expand Down
24 changes: 24 additions & 0 deletions housekeeping/docker/kagome-dev/install_packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
set -e
set -u
export DEBIAN_FRONTEND=noninteractive
n=0
max=2
until [ $n -gt $max ]; do
set +e
(
apt-get update -qq &&
apt-get install -y --no-install-recommends "$@"
)
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
break
fi
if [ $n -eq $max ]; then
exit $CODE
fi
echo "apt failed, retrying"
n=$(($n + 1))
done
rm -r /var/lib/apt/lists /var/cache/apt/archives
15 changes: 11 additions & 4 deletions housekeeping/docker/kagome-dev/kagome_builder_deb.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG BASE_IMAGE
ARG RUST_VERSION
ARG ARCHITECTURE=x86_64

ARG DEBIAN_VERSION=bookworm
ARG DEBIAN_VERSION=unstable
ARG LLVM_VERSION=19
ARG GCC_VERSION=13

Expand All @@ -24,16 +24,23 @@ ENV LLVM_VERSION=${LLVM_VERSION}
ARG GCC_VERSION
ENV GCC_VERSION=${GCC_VERSION}

COPY install_packages /usr/sbin/install_packages
RUN chmod 0755 /usr/sbin/install_packages

RUN install_packages \
apt-transport-https \
ca-certificates \
gnupg \
wget

RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${LLVM_VERSION} main" | \
tee -a /etc/apt/sources.list.d/llvm.list
RUN echo "deb http://deb.debian.org/debian/ trixie main" | tee -a /etc/apt/sources.list
RUN if [ "$DEBIAN_VERSION" = "unstable" ]; then \
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${LLVM_VERSION} main" | \
tee -a /etc/apt/sources.list.d/llvm.list; \
else \
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${LLVM_VERSION} main" | \
tee -a /etc/apt/sources.list.d/llvm.list; \
fi

RUN install_packages \
build-essential \
Expand Down
8 changes: 3 additions & 5 deletions housekeeping/docker/kagome-dev/minideb.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ENV AUTHOR=${AUTHOR}
LABEL org.opencontainers.image.authors="${AUTHOR}"
LABEL org.opencontainers.image.description="Kagome image"

COPY install_packages /usr/sbin/install_packages
RUN chmod 0755 /usr/sbin/install_packages

RUN install_packages \
bash \
software-properties-common \
Expand Down Expand Up @@ -65,11 +68,6 @@ RUN --mount=type=secret,id=google_creds,target=/root/.gcp/google_creds.json \
kagome-dev=${KAGOME_PACKAGE_VERSION} && \
sed -i '1s/^/#/' /etc/apt/sources.list.d/kagome.list

# temporary fix for libc6 (gcc-13)
# TODO: remove when CI swithed to trixie
RUN echo "deb http://deb.debian.org/debian/ trixie main" | tee -a /etc/apt/sources.list && apt update
RUN apt install -y libc6 libstdc++6 libgcc-s1 -t trixie

CMD ["/usr/bin/tini", "--", "/bin/bash", "-c"]


Expand Down
4 changes: 2 additions & 2 deletions zombienet/docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shared Environment Variables
# bookworm (Debian 12)
MINIDEB_IMAGE=bitnami/minideb@sha256:6cc3baf349947d587a9cd4971e81ff3ffc0d17382f2b5b6de63d6542bff10c16
# trixie (Debian 13)
MINIDEB_IMAGE ?= debian:trixie-slim@sha256:c63174f799a74411a0290f25086fdc5dc939aa1f8971a16ad6fb1b7658a25126
## DOCKER_REGISTRY_PATH empty for local usage
DOCKER_REGISTRY_PATH ?=
GOOGLE_APPLICATION_CREDENTIALS ?=
Expand Down
24 changes: 24 additions & 0 deletions zombienet/docker/install_packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
set -e
set -u
export DEBIAN_FRONTEND=noninteractive
n=0
max=2
until [ $n -gt $max ]; do
set +e
(
apt-get update -qq &&
apt-get install -y --no-install-recommends "$@"
)
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
break
fi
if [ $n -eq $max ]; then
exit $CODE
fi
echo "apt failed, retrying"
n=$(($n + 1))
done
rm -r /var/lib/apt/lists /var/cache/apt/archives
8 changes: 3 additions & 5 deletions zombienet/docker/zombie_tester.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ ENV ZOMBIENET_RELEASE=$ZOMBIENET_RELEASE
ARG POLKADOT_SDK_RELEASE
ENV POLKADOT_SDK_RELEASE=$POLKADOT_SDK_RELEASE

COPY install_packages /usr/sbin/install_packages
RUN chmod 0755 /usr/sbin/install_packages

RUN groupadd --gid 10000 nonroot && \
useradd --home-dir /home/nonroot \
--create-home \
Expand Down Expand Up @@ -128,8 +131,3 @@ RUN install_packages \
libseccomp2 \
libatomic1 \
ssh

# temporary fix for libc6 (gcc-13)
# TODO: remove when CI swithed to trixie
RUN echo "deb http://deb.debian.org/debian/ trixie main" | tee -a /etc/apt/sources.list && apt update
RUN apt install -y libc6 libstdc++6 libgcc-s1 -t trixie
Loading