Added makefile and woodpecker folder for CI
Some checks are pending
ci/woodpecker/manual/deploy Pipeline is pending

This commit is contained in:
Oscar Blue 2022-12-03 02:03:42 +00:00
parent a4810e8b48
commit 75b0eb0f63
2 changed files with 31 additions and 0 deletions

9
.woodpecker/deploy.yml Normal file
View file

@ -0,0 +1,9 @@
branches: main
pipeline:
init:
image: hashicorp/terraform
commands:
- CODE_PATH=./hetzner/template make init

22
Makefile Normal file
View file

@ -0,0 +1,22 @@
CODE_PATH ?= .
init:
@cd $(CODE_PATH) && terraform init -reconfigure -upgrade
plan: init validate
@cd $(CODE_PATH) && terraform plan
apply: init validate
@cd $(CODE_PATH) && terraform apply --auto-approve
refresh: init validate
@cd $(CODE_PATH) && terraform refresh
fmt:
@cd $(CODE_PATH) && terraform fmt -check -recursive
validate:
@cd $(CODE_PATH) && terraform validate
output: init
@cd $(CODE_PATH) && terraform output