Compare commits

..

No commits in common. "993b866e601758858458dab9bb0951c220df5e6e" and "2c523134e0f99c492f5b0e1dbc5ce061e3a72396" have entirely different histories.

4 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View file

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

View file

@ -1,6 +1,6 @@
ENVRUN_VERSION := 0.7.3 ENVRUN_VERSION := 0.7.1
PACKER_VERSION := 1.11.2 PACKER_VERSION := 1.10.2
YQ_VERSION := 4.44.3 YQ_VERSION := 4.31.2
ENVRUN := ./envrun_$(ENVRUN_VERSION) ENVRUN := ./envrun_$(ENVRUN_VERSION)
PACKER := ./packer_$(PACKER_VERSION) PACKER := ./packer_$(PACKER_VERSION)
@ -8,8 +8,10 @@ YQ := ./yq_$(YQ_VERSION)
default: default:
build/%.yaml: $(ENVRUN) $(PACKER) $(YQ) config.json: $(YQ)
$(YQ) -ojson . $*.yaml | jq -S . >config.json $(YQ) -ojson . config.yaml | jq -S . >config.json
create-snapshot: config.json $(ENVRUN) $(PACKER)
$(PACKER) init alpine.pkr.hcl $(PACKER) init alpine.pkr.hcl
$(ENVRUN) -- $(PACKER) build -var-file=config.json 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 ## Usage
- Create an `.env` file containing an `HCLOUD_TOKEN=someimportanttoken` - Create an `.env` file containing an `HCLOUD_TOKEN=someimportanttoken`
- Execute `make build/<your YAML config, i.e. config.yaml>` - Execute `make create-snapshot`