mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-03-21 18:41:10 +00:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a pre-commit workflow to automate checks before code merges. - Added a section in the README for testing packages locally. - **Improvements** - Enhanced PostgreSQL initialization script for better user and role management. - Updated documentation for Managed PostgreSQL Service with improved formatting and additional backup parameters. - Integrated pre-commit hooks for maintaining code quality in YAML and Markdown files. - Added a new target in the installer Makefile to run pre-checks before building images. - **Bug Fixes** - Adjusted formatting in various README files to ensure consistent presentation. - **Chores** - Updated image reference to use the latest version in configuration files. - Updated versioning for various packages in the versions map. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
67 lines
2.3 KiB
Makefile
67 lines
2.3 KiB
Makefile
NAME=installer
|
|
NAMESPACE=cozy-system
|
|
|
|
TALOS_VERSION=$(shell awk '/^version:/ {print $$2}' images/talos/profiles/installer.yaml)
|
|
|
|
include ../../../scripts/common-envs.mk
|
|
|
|
pre-checks:
|
|
../../../hack/pre-checks.sh
|
|
|
|
show:
|
|
helm template -n $(NAMESPACE) $(NAME) .
|
|
|
|
apply:
|
|
helm template -n $(NAMESPACE) $(NAME) . | kubectl apply -f -
|
|
|
|
diff:
|
|
helm template -n $(NAMESPACE) $(NAME) . | kubectl diff -f -
|
|
|
|
update:
|
|
hack/gen-profiles.sh
|
|
|
|
image: pre-checks image-cozystack image-talos image-matchbox
|
|
|
|
image-cozystack:
|
|
make -C ../../.. repos
|
|
docker buildx build -f images/cozystack/Dockerfile ../../.. \
|
|
--provenance false \
|
|
--tag $(REGISTRY)/cozystack:$(call settag,$(TAG)) \
|
|
--cache-from type=registry,ref=$(REGISTRY)/cozystack:latest \
|
|
--platform linux/amd64,linux/arm64 \
|
|
--cache-to type=inline \
|
|
--metadata-file images/cozystack.json \
|
|
--push=$(PUSH) \
|
|
--load=$(LOAD)
|
|
IMAGE="$(REGISTRY)/cozystack:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack.json -o json -r)" \
|
|
yq -i '.cozystack.image = strenv(IMAGE)' values.yaml
|
|
rm -f images/cozystack.json
|
|
|
|
image-talos:
|
|
test -f ../../../_out/assets/installer-amd64.tar || make talos-installer
|
|
docker load -i ../../../_out/assets/installer-amd64.tar
|
|
docker tag ghcr.io/siderolabs/installer:$(TALOS_VERSION) $(REGISTRY)/talos:$(call settag,$(TALOS_VERSION))
|
|
docker push $(REGISTRY)/talos:$(call settag,$(TALOS_VERSION))
|
|
|
|
image-matchbox:
|
|
test -f ../../../_out/assets/kernel-amd64 || make talos-kernel
|
|
test -f ../../../_out/assets/initramfs-metal-amd64.xz || make talos-initramfs
|
|
docker buildx build -f images/matchbox/Dockerfile ../../.. \
|
|
--provenance false \
|
|
--tag $(REGISTRY)/matchbox:$(call settag,$(TAG)) \
|
|
--tag $(REGISTRY)/matchbox:$(call settag,$(TALOS_VERSION)-$(TAG)) \
|
|
--cache-from type=registry,ref=$(REGISTRY)/matchbox:latest \
|
|
--cache-to type=inline \
|
|
--metadata-file images/matchbox.json \
|
|
--push=$(PUSH) \
|
|
--load=$(LOAD)
|
|
rm -f images/matchbox.json
|
|
|
|
assets: talos-iso talos-nocloud talos-metal
|
|
|
|
talos-initramfs talos-kernel talos-installer talos-iso talos-nocloud talos-metal:
|
|
mkdir -p ../../../_out/assets
|
|
cat images/talos/profiles/$(subst talos-,,$@).yaml | \
|
|
docker run --rm -i -v /dev:/dev --privileged "ghcr.io/siderolabs/imager:$(TALOS_VERSION)" --tar-to-stdout - | \
|
|
tar -C ../../../_out/assets -xzf-
|