mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-28 10:18:42 +00:00
Update values.yaml with image metadata after build
This commit is contained in:
@@ -20,9 +20,9 @@ update-dockerfiles:
|
||||
components := $(subst /,,$(subst images/,,$(dir $(wildcard images/*/Dockerfile))))
|
||||
img_targets := $(addprefix image-,$(components))
|
||||
|
||||
update-images: $(img-targets)
|
||||
update-images: $(img_targets)
|
||||
|
||||
.PHONY = $(img_targets)
|
||||
.PHONY: $(img_targets)
|
||||
$(img_targets):
|
||||
@$(eval name := $(subst image-,,$@))
|
||||
@$(eval tag := $(shell egrep -o "FROM .*$(name).*" images/$(name)/Dockerfile | awk -F: '{print $$NF}'))
|
||||
@@ -33,5 +33,10 @@ $(img_targets):
|
||||
--cache-to type=inline \
|
||||
--metadata-file images/$(name).json \
|
||||
--push=$(PUSH) \
|
||||
--load=$(LOAD)
|
||||
--load=$(LOAD) && \
|
||||
img_name=$$(jq -r '."image.name" | split(":")[:-1] | join(":")' images/$(name).json) \
|
||||
yq -i '.$(name).image.manager.repository = ("$${img_name}"|envsubst(nu,ne))' values.yaml && \
|
||||
img_tag=$$(jq -r '."image.name" | split(":")[-1]' images/$(name).json) \
|
||||
img_digest=$$(jq -r '."containerimage.digest"' images/$(name).json) \
|
||||
yq -i '.$(name).image.manager.tag = ("$${img_tag}@$${img_digest}"|envsubst(nu,ne))' values.yaml
|
||||
|
||||
|
||||
5
packages/system/capi-operator/values.yaml
Normal file
5
packages/system/capi-operator/values.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
cluster-api-operator:
|
||||
image:
|
||||
manager:
|
||||
repository: "localhost:5000/aenix-io/cozystack/system/cluster-api-operator"
|
||||
tag: "v0.8.1@sha256:79282412e0b891630235ecf919c45b0531f25a0926825385a51bb2a7dde880fb"
|
||||
Reference in New Issue
Block a user