Compare commits

..

2 commits

Author SHA1 Message Date
993b866e60
Rewrite build-targets to build multiple images from repo
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-08-21 14:38:16 +02:00
fefa09c86e
Update build tooling
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-08-21 13:50:43 +02:00
4 changed files with 7 additions and 8 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ config.json
envrun_*
packer_*
yq_*
LICENSE.txt

View file

@ -1,6 +1,6 @@
ENVRUN_VERSION := 0.7.1
PACKER_VERSION := 1.10.2
YQ_VERSION := 4.31.2
ENVRUN_VERSION := 0.7.3
PACKER_VERSION := 1.11.2
YQ_VERSION := 4.44.3
ENVRUN := ./envrun_$(ENVRUN_VERSION)
PACKER := ./packer_$(PACKER_VERSION)
@ -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>`