Added makefile and woodpecker folder for CI
Some checks are pending
ci/woodpecker/manual/deploy Pipeline is pending
Some checks are pending
ci/woodpecker/manual/deploy Pipeline is pending
This commit is contained in:
parent
a4810e8b48
commit
75b0eb0f63
2 changed files with 31 additions and 0 deletions
9
.woodpecker/deploy.yml
Normal file
9
.woodpecker/deploy.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
branches: main
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
init:
|
||||||
|
image: hashicorp/terraform
|
||||||
|
commands:
|
||||||
|
- CODE_PATH=./hetzner/template make init
|
||||||
|
|
||||||
|
|
22
Makefile
Normal file
22
Makefile
Normal 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
|
Loading…
Reference in a new issue