Deployment added.

This commit is contained in:
2026-09-02 17:45:38 +00:00
parent 1a9c69fc9d
commit c078745bc0
15 changed files with 235 additions and 18 deletions
+36
View File
@@ -0,0 +1,36 @@
.PHONY: build-production
build-production: ## Build the production docker image and push to private registry
@docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag registry.tanshu.com/hops:latest \
$(if $(filter-out latest,$(TAG)),--tag registry.tanshu.com/hops:$(TAG)) \
--push \
--pull \
git@git.tanshu.com:tanshu/hops.git
.PHONY: build-check
build-check: ## Multi-arch build without push (compile check)
@docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag hops:test \
--pull \
--progress=plain \
git@git.tanshu.com:tanshu/hops.git
.PHONY: build-check-local
build-check-local: ## Multi-arch build without push (compile check)
@git archive --format=tar HEAD | docker buildx build \
--platform linux/amd64 \
--tag hops:test \
--pull \
--progress=plain \
--load \
-
# .PHONY: deploy
# deploy: ## Build, upload to registry, and trigger Ansible deployment
# @./deploy.sh --deploy $(if $(TAG),$(TAG))
# .PHONY: ansible-deploy
# ansible-deploy: ## Run Ansible playbook directly
# @cd ansible && ansible-playbook -i hosts playbook.yml $(if $(TAG),-e "tag=$(TAG)")