mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Refactored docker role include
This commit is contained in:
27
Makefile
27
Makefile
@@ -1,17 +1,26 @@
|
||||
ROLES_DIR=./roles
|
||||
OUTPUT=./group_vars/all/11_applications.yml
|
||||
SCRIPT=./cli/generate_defaults_applications.py
|
||||
ROLES_DIR := ./roles
|
||||
APPLICATIONS_OUT := ./group_vars/all/11_applications.yml
|
||||
APPLICATIONS_SCRIPT := ./cli/generate_defaults_applications.py
|
||||
INCLUDES_OUT := ./tasks/include-docker-roles.yml
|
||||
INCLUDES_SCRIPT := ./cli/generate_role_includes.py
|
||||
|
||||
.PHONY: build install test
|
||||
|
||||
build:
|
||||
@echo "🔧 Generating $(OUTPUT) from roles in $(ROLES_DIR)..."
|
||||
@mkdir -p $(dir $(OUTPUT))
|
||||
python3 $(SCRIPT) --roles-dir $(ROLES_DIR) --output-file $(OUTPUT)
|
||||
@echo "✅ Output written to $(OUTPUT)"
|
||||
@echo "🔧 Generating applications defaults → $(APPLICATIONS_OUT) from roles in $(ROLES_DIR)…"
|
||||
@mkdir -p $(dir $(APPLICATIONS_OUT))
|
||||
python3 $(APPLICATIONS_SCRIPT) --roles-dir $(ROLES_DIR) --output-file $(APPLICATIONS_OUT)
|
||||
@echo "✅ Applications defaults written to $(APPLICATIONS_OUT)\n"
|
||||
@echo "🔧 Generating Docker role includes → $(INCLUDES_OUT)…"
|
||||
@mkdir -p $(dir $(INCLUDES_OUT))
|
||||
python3 $(INCLUDES_SCRIPT) $(ROLES_DIR) -o $(INCLUDES_OUT) -p docker-
|
||||
@echo "✅ Docker role includes written to $(INCLUDES_OUT)"
|
||||
|
||||
install: build
|
||||
@echo "⚙️ Install complete."
|
||||
|
||||
test:
|
||||
@echo "Executing Unit Tests:"
|
||||
@echo "\n🧪 Running Unit Tests..."
|
||||
python -m unittest discover -s tests/unit
|
||||
@echo "Executing Integration Tests:"
|
||||
@echo "\n🔬 Running Integration Tests..."
|
||||
python -m unittest discover -s tests/integration
|
Reference in New Issue
Block a user