2024-03-09 22:35:17 +00:00
|
|
|
REPOSITORY = vcs.enp.one/skylab/semaphore-container
|
2024-02-28 18:29:20 +00:00
|
|
|
OPENTOFU_VERSION = 1.6.2
|
2024-03-26 22:57:14 +00:00
|
|
|
SEMAPHORE_VERSION = 2.9.58
|
2024-03-09 22:35:17 +00:00
|
|
|
SPECTRE_VERSION = main
|
|
|
|
PYTHON_VERSION = 3.11
|
2024-02-28 18:29:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: help docs
|
|
|
|
# source: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
|
|
|
help: ## List Makefile targets
|
|
|
|
$(info Makefile documentation)
|
|
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}'
|
|
|
|
|
|
|
|
|
|
|
|
image: ## Build image
|
2024-03-09 22:35:17 +00:00
|
|
|
podman build . --tag $(REPOSITORY):v$(SEMAPHORE_VERSION) --build-arg "OPENTOFU_VERSION=$(OPENTOFU_VERSION)" --build-arg "SEMAPHORE_VERSION=$(SEMAPHORE_VERSION)" --build-arg "PYTHON_VERSION=$(PYTHON_VERSION)" --build-arg "SPECTRE_VERSION=$(SPECTRE_VERSION)"
|
2024-02-28 18:29:20 +00:00
|
|
|
|
|
|
|
push: image ## Build and publish image
|
2024-03-11 18:08:14 +00:00
|
|
|
podman login $(shell echo $(REPOSITORY) | cut -d '/' -f 1)
|
2024-02-28 18:58:14 +00:00
|
|
|
podman push $(REPOSITORY):v$(SEMAPHORE_VERSION)
|
2024-03-11 15:21:24 +00:00
|
|
|
|
|
|
|
dev: ## Setup local dev environment
|
|
|
|
poetry install --with dev
|
|
|
|
poetry run pre-commit install
|