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:
@@ -5,12 +5,18 @@ $imageNamespace = if ($env:IMAGE_NAMESPACE) { $env:IMAGE_NAMESPACE } else { "325
|
||||
$imageTag = if ($env:IMAGE_TAG) { $env:IMAGE_TAG } else { "local" }
|
||||
$imagePrefix = if ($env:IMAGE_PREFIX) { $env:IMAGE_PREFIX } else { "remnawave-minishop" }
|
||||
$dockerfile = if ($env:DOCKERFILE) { $env:DOCKERFILE } else { "deploy/docker/Dockerfile" }
|
||||
$buildProvenance = if ($env:REMNAWAVE_MINISHOP_BUILD_PROVENANCE) { $env:REMNAWAVE_MINISHOP_BUILD_PROVENANCE } else { "custom" }
|
||||
|
||||
function Build-Image {
|
||||
param([string]$Target)
|
||||
$image = "$imageRegistry/$imageNamespace/$imagePrefix-$Target`:$imageTag"
|
||||
Write-Host "Building $image" -ForegroundColor Cyan
|
||||
docker build -f $dockerfile --target $Target -t $image .
|
||||
docker build `
|
||||
-f $dockerfile `
|
||||
--target $Target `
|
||||
--build-arg "REMNAWAVE_MINISHOP_BUILD_PROVENANCE=$buildProvenance" `
|
||||
-t $image `
|
||||
.
|
||||
}
|
||||
|
||||
Build-Image backend
|
||||
|
||||
Reference in New Issue
Block a user