diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7744c08 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +IMAGE := edenic-exporter +REGISTRY := mysources.co.uk +REGISTRY_IMAGE := $(REGISTRY)/michal/$(IMAGE) +# The k8s cluster is mixed amd64+arm64 — the registry image MUST be a multi-arch +# manifest list, or pods on the "other" arch crash with `exec format error`. +PLATFORMS := linux/amd64,linux/arm64 +MANIFEST := edenic-exporter-mm + +.PHONY: build-push +# Log in once first (GITEA_TOKEN): +# echo "$$GITEA_TOKEN" | podman login mysources.co.uk -u michal --password-stdin +build-push: + -podman manifest rm $(MANIFEST) 2>/dev/null + podman build --platform $(PLATFORMS) --manifest $(MANIFEST) . + podman manifest push --all $(MANIFEST) docker://$(REGISTRY_IMAGE):latest + podman manifest inspect docker://$(REGISTRY_IMAGE):latest | grep architecture