-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from mintel/INFRA-35385-Add-packer-helpers
Infra 35385 add packer helpers
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Packer helpers | ||
PACKER_REPO_BRANCH?=main | ||
PACKER_REPO?[email protected]:mintel/satoshi/templates/packer-repo.git | ||
PACKER_REPO_DIR=/tmp/packer-repo | ||
PACKER_SOURCE_FILE="sources.pkr.hcl" | ||
|
||
.PHONY: packer/update-sources | ||
## Pulls in the current version of the `sources.pkr.hcl` file from the packer-repo template | ||
packer/update-sources: | ||
@echo "Cloning packer-repo: "${PACKER_REPO}"" | ||
@if [ -f "$(PACKER_SOURCE_FILE)" ]; then \ | ||
rm -rf $(PACKER_SOURCE_FILE) ;\ | ||
fi ;\ | ||
git clone --depth=1 $(PACKER_REPO) -b $(PACKER_REPO_BRANCH) $(PACKER_REPO_DIR) ;\ | ||
echo "Copying "${PACKER_SOURCE_FILE}"" | ||
cp "${PACKER_REPO_DIR}/${PACKER_SOURCE_FILE}" "${PACKER_SOURCE_FILE}" | ||
echo "Cleanup cloned dir ${PACKER_REPO_DIR}" | ||
rm -rf ${PACKER_REPO_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# DO NOT OVERRIDE THIS FILE. AUTO-GENERATED FROM 'make satoshi/update-makefile/packer' | ||
# | ||
export HELP_FILTER ?= asdf|grafana|jsonnet|k8s|kyverno|opa|pluto|satoshi|updater | ||
-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness) | ||
export BUILD_HARNESS_PATH ?= $(shell 'pwd') | ||
export BUILD_HARNESS_EXTENSIONS_PATH ?= $(BUILD_HARNESS_PATH)/build-harness-extensions | ||
|
||
## Init build-harness and build-harness-extensions | ||
.PHONY: bootstrap | ||
bootstrap: | ||
make init | ||
if [ ! -d "./build-harness-extensions" ]; then git submodule add https://github.com/mintel/build-harness-extensions.git build-harness-extensions ; fi | ||
git submodule update --init --recursive | ||
exit 0 | ||
|
||
## Install tools | ||
.PHONY: install | ||
install: | ||
@if [ ! -f .tool-versions ]; then \ | ||
make satoshi/update-tools/packer; \ | ||
else \ | ||
make asdf/install; \ | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# DO NOT OVERRIDE THIS FILE. AUTO-GENERATED FROM 'make satoshi/update-tools/packer'. | ||
# | ||
|
||
#asdf:plugin add packer | ||
packer 1.10.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters