forked from PaloAltoNetworks/pan-fca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (54 loc) · 1.47 KB
/
Makefile
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
56
57
58
59
60
61
62
63
64
65
# Makefile targets simplify daily operatons:
# make: Same as "make test"
# make test: Runs all testing (lint, unit, integ) in sequence
# make setup: Installs packages and builds the vault password file
# make lint: Runs YAML and Python linters
# make unit: Runs function-level testing on Python filters
# make integ: Runs the test playbook (integration test)
.DEFAULT_GOAL := test
.PHONY: test
test: lint unit integ
.PHONY: setup
setup:
@echo "Starting setup"
pip install -r requirements.txt
@echo "Completed setup"
.PHONY: lint
lint:
@echo "Starting lint"
find . -name "*.yml" | xargs yamllint -s
find . -name "*.py" | xargs pylint
# find . -name "*.py" | xargs bandit
@echo "Completed lint"
.PHONY: unit
unit:
@echo "Starting unit tests"
ansible-playbook tests/unittest_playbook.yml
@echo "Completed unit tests"
.PHONY: integ
integ:
@echo "Starting integration tests"
ansible-playbook tests/integration_playbook.yml
@echo "Completed integration tests"
#.DEFAULT_GOAL := help
#.PHONY: help cloud aws azure destroy runner slim-runner
#
#aws:
# ansible-playbook configuration_push.yml -e cloud_provider=aws
#
#azure:
# ansible-playbook configuration_push.yml -e cloud_provider=azure
#
#runner:
# docker run -it -v ${PWD}:/fca dirtyonekanobi/ansible-terraform
#
#slim-runner:
# docker run -it -v ${PWD}:/fca dirtyonekanobi/ansible-terraform-slim
#
#cloud:
# ansible-playbook configuration_push.yml
#help:
# ansible --version
#
#destroy:
# terraform destroy -auto-approve