Rewrite build-targets to build multiple images from repo

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-08-21 13:51:13 +02:00
parent fefa09c86e
commit 993b866e60
Signed by: luzifer
SSH Key Fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
3 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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/<your YAML config, i.e. config.yaml>`