-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (46 loc) · 2.22 KB
/
Makefile
File metadata and controls
55 lines (46 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
AVM_PORCH_BASE_URL := git::https://github.com/Azure/avm-terraform-governance//porch-configs
AVM_PORCH_REF := main
.PHONY: help
help:
@echo "please use 'make <target>'"
@echo "available targets are:"
@echo " help"
@echo " migrate (a no-op, this repo has already been migrated)"
@echo " pre-commit (runs doc generation and repo file sync)"
@echo " pr-check (checks that pre-commit has been run and runs linters)"
@echo " test-examples (tests all examples - set `AVM_EXAMPLE` to the specific example name to only test one)"
@echo " tf-test-unit (runs unit tests in `tests/unit`)"
@echo " tf-test-integration (runs integration tests in `tests/integration`)"
@echo " globalsetup (runs global setup tasks, only if you have a `examples/setup.sh`)"
@echo " globalteardown (runs global teardown tasks, only if you have a `examples/teardown.sh`)"
.PHONY: migrate
migrate:
@echo "This is a no-op. This repo has already been migrated."
.PHONY: pre-commit
pre-commit:
@echo "Running pre-commit..."
porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/pre-commit.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}
.PHONY: pr-check
pr-check:
@echo "Running PR check..."
porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/pr-check.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}
.PHONY: test-examples
test-examples:
@echo "Testing examples..."
porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/test-examples.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}
.PHONY: tf-test-unit
tf-test-unit:
@echo "Running terraform unit test..."
AVM_TEST_TYPE="unit" porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/terraform-test.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}
.PHONY: tf-test-integration
tf-test-integration:
@echo "Running terraform integration test..."
AVM_TEST_TYPE="integration" porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/terraform-test.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}
.PHONY: globalsetup
globalsetup:
@echo "Running global setup..."
porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/global-setup.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}
.PHONY: globalteardown
globalteardown:
@echo "Running global teardown..."
porch run ${TUI} -f "$(AVM_PORCH_BASE_URL)/global-teardown.porch.yaml?ref=$(AVM_PORCH_REF)" ${AVM_PORCH_STDOUT}