From 1a01d0b13b86df44b501a10c73a830f292da3af2 Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Sat, 22 Apr 2023 22:35:09 +0200 Subject: [PATCH] fix(ci): add manifest to tarballs --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1e0d98a..9425c74 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,10 @@ build: .PHONY: build-container-tarball build-container-tarball: mkdir -p target/ - docker build -t sonic_exporter . - docker image save sonic_exporter -o target/sonic_exporter.tar + rm -f target/sonic_exporter.tar* || true + docker build \ + -t sonic_exporter:$(VERSION) \ + --label='com.azure.sonic.manifest=$(shell cat manifest.json | sed "s/__VERSION__/$(subst v,,$(VERSION))/" | jq -c .)' \ + . + docker image save sonic_exporter:$(VERSION) -o target/sonic_exporter.tar gzip target/sonic_exporter.tar