Commit e7b28aae authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

ci(ansible): 在更新任务前输出关键环境变量

parent 7bb06c11
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -174,6 +174,9 @@ ansible-deploy:
	ansible-playbook -i deploy_configs/$(ENV)/inventory.ini ansible/deploy.yml $(ANSIBLE_EXTRA_VARS)

ansible-update:
	@echo "ENV=$(ENV)"
	@echo "BUILD_NUMBER=$(BUILD_NUMBER)"
	@echo "HARBOR_PROJECT=$(HARBOR_PROJECT)"
	@if [ -z "$(ENV)" ]; then echo "Error: ENV is not set. Usage: make ansible-update ENV=p368"; exit 1; fi
	@if [ ! -f "deploy_configs/$(ENV)/inventory.ini" ]; then echo "Error: deploy_configs/$(ENV)/inventory.ini not found"; exit 1; fi
	ansible-playbook -i deploy_configs/$(ENV)/inventory.ini ansible/update.yml $(ANSIBLE_EXTRA_VARS)