From 993b866e601758858458dab9bb0951c220df5e6e Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 21 Aug 2024 13:51:13 +0200 Subject: [PATCH] Rewrite build-targets to build multiple images from repo Signed-off-by: Knut Ahlers --- Makefile | 6 ++---- README.md | 2 +- config.yaml => alpine-k8s.yaml | 0 3 files changed, 3 insertions(+), 5 deletions(-) rename config.yaml => alpine-k8s.yaml (100%) diff --git a/Makefile b/Makefile index 26fdd22..ea75e28 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,8 @@ YQ := ./yq_$(YQ_VERSION) default: -config.json: $(YQ) - $(YQ) -ojson . config.yaml | jq -S . >config.json - -create-snapshot: config.json $(ENVRUN) $(PACKER) +build/%.yaml: $(ENVRUN) $(PACKER) $(YQ) + $(YQ) -ojson . $*.yaml | jq -S . >config.json $(PACKER) init alpine.pkr.hcl $(ENVRUN) -- $(PACKER) build -var-file=config.json alpine.pkr.hcl diff --git a/README.md b/README.md index 012f542..c309c46 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ It contains a modified version of the packer / ansible setup to create a snapsho ## Usage - Create an `.env` file containing an `HCLOUD_TOKEN=someimportanttoken` -- Execute `make create-snapshot` +- Execute `make build/` diff --git a/config.yaml b/alpine-k8s.yaml similarity index 100% rename from config.yaml rename to alpine-k8s.yaml