feat: add telemetry build provenance

Stamp official Docker builds with a low-cardinality provenance marker and report build_provenance/image_modified in anonymous telemetry. Local and fork builds default to custom, while official GitHub/GitLab release paths mark images as official.
This commit is contained in:
3252a8
2026-06-10 15:18:32 +03:00
parent fd931581f5
commit 6bb2709244
22 changed files with 261 additions and 44 deletions
+7 -1
View File
@@ -12,6 +12,7 @@ $imagePrefix = if ($env:IMAGE_PREFIX) { $env:IMAGE_PREFIX } else { "remnawave-mi
$dockerfile = if ($env:DOCKERFILE) { $env:DOCKERFILE } else { "deploy/docker/Dockerfile" }
$targetsRaw = if ($env:TARGETS) { $env:TARGETS } else { "backend,worker,frontend" }
$targets = @($targetsRaw -split "[,;\s]+" | Where-Object { $_ })
$buildProvenance = if ($env:REMNAWAVE_MINISHOP_BUILD_PROVENANCE) { $env:REMNAWAVE_MINISHOP_BUILD_PROVENANCE } else { "custom" }
function Get-ImageName {
param(
@@ -31,7 +32,12 @@ function Build-Image {
}
Write-Host "Building $Target for: $($imageRegistries -join ', ')" -ForegroundColor Cyan
docker build -f $dockerfile --target $Target @tagArgs .
docker build `
-f $dockerfile `
--target $Target `
--build-arg "REMNAWAVE_MINISHOP_BUILD_PROVENANCE=$buildProvenance" `
@tagArgs `
.
}
function Push-Image {