feat: update forage ci

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-03-21 01:56:52 +01:00
parent 7188b44624
commit 995cec7491
2 changed files with 7 additions and 7 deletions

View File

@@ -190,7 +190,7 @@ async fn build_base(client: &dagger_sdk::Query) -> eyre::Result<dagger_sdk::Cont
// Base rust image with build tools.
let rust_base = client
.container()
.from("rust:1.85-bookworm")
.from("rust:1.93-trixie")
.with_exec(vec!["apt", "update"])
.with_exec(vec!["apt", "install", "-y", "clang", "wget"])
// Install mold linker.
@@ -255,11 +255,11 @@ async fn build_release_image(
let templates = client.host().directory("templates");
let static_assets = client.host().directory("static");
// Distroless cc-debian12 matches the build image's glibc
// Distroless cc-debian13 matches the build image's glibc (trixie/2.38+)
// and includes libgcc + ca-certificates with no shell or package manager.
let final_image = client
.container()
.from("gcr.io/distroless/cc-debian12")
.from("gcr.io/distroless/cc-debian13")
.with_file(format!("/usr/local/bin/{BIN_NAME}"), binary)
.with_directory("/templates", templates)
.with_directory("/static", static_assets)
@@ -279,10 +279,10 @@ async fn publish_image(
client: &dagger_sdk::Query,
image: &dagger_sdk::Container,
) -> eyre::Result<()> {
let registry = std::env::var("CI_REGISTRY").unwrap_or_else(|_| "registry.forage.sh".into());
let registry = std::env::var("CI_REGISTRY").unwrap_or_else(|_| "git.kjuulh.io".into());
let user = std::env::var("CI_REGISTRY_USER").unwrap_or_else(|_| "forage".into());
let image_name = std::env::var("CI_IMAGE_NAME")
.unwrap_or_else(|_| format!("{registry}/{user}/forage-server"));
.unwrap_or_else(|_| format!("{registry}/forage/client/forage-server"));
let password = std::env::var("CI_REGISTRY_PASSWORD")
.map_err(|_| eyre::eyre!("CI_REGISTRY_PASSWORD must be set for publishing"))?;

View File

@@ -1,4 +1,4 @@
FROM rust:1.85-bookworm AS builder
FROM rust:1.93-trixie AS builder
RUN apt-get update && \
apt-get install -y clang mold && \
@@ -43,7 +43,7 @@ RUN cargo build --release -p forage-server
RUN ./target/release/forage-server --help || true
# Runtime image
FROM gcr.io/distroless/cc-debian12:latest
FROM gcr.io/distroless/cc-debian13:latest
COPY --from=builder /mnt/src/target/release/forage-server /usr/local/bin/forage-server
COPY --from=builder /mnt/src/templates /templates