-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
67 lines (51 loc) · 1.88 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
66
67
PYTHON_MAJOR_MINOR := $(shell python -c "import sys; print('{0}{1}'.format(*sys.version_info))")
REQUIREMENTS_TXT = requirements$(PYTHON_MAJOR_MINOR).txt
.PHONY: core-requirements
core-requirements:
pip install pip setuptools pip-tools
.PHONY: update-requirements
update-requirements: core-requirements
pip install -U pip setuptools pip-tools
pip-compile -U requirements.in -o $(REQUIREMENTS_TXT)
.PHONY: requirements
requirements: core-requirements
pip-sync $(REQUIREMENTS_TXT)
.PHONY: galaxy-requirements
galaxy-requirements: requirements
ansible-galaxy install -f -p tests/roles -r tests/roles/requirements.yml
.PHONY: syntax-check
syntax-check: requirements galaxy-requirements
ANSIBLE_CONFIG=tests/ansible.cfg ansible-playbook -i tests/inventory tests/main.yml --syntax-check
.PHONY: setup
setup: requirements galaxy-requirements
ANSIBLE_CONFIG=tests/ansible.cfg ansible-playbook -i tests/inventory -vv tests/setup.yml
.PHONY: test
test: requirements galaxy-requirements
ANSIBLE_CONFIG=tests/ansible.cfg ansible-playbook -i tests/inventory -vv tests/main.yml
.PHONY: test-lookup-only
test-lookup-only: requirements galaxy-requirements
ANSIBLE_CONFIG=tests/ansible.cfg ansible-playbook -i tests/inventory -vv tests/test_lookup.yml
.PHONY: test-only
test-only: requirements galaxy-requirements
ANSIBLE_CONFIG=tests/ansible.cfg ansible-playbook -i tests/inventory -vv tests/test.yml
.PHONY: cleanup
cleanup: requirements galaxy-requirements
ANSIBLE_CONFIG=tests/ansible.cfg ansible-playbook -i tests/inventory -vv tests/cleanup.yml
.PHONY: clean-tox
clean-tox:
rm -rf .tox
.PHONY: tox
tox: requirements galaxy-requirements
tox
.PHONY: lint
lint: requirements galaxy-requirements
ansible-lint tests/main.yml
.PHONY: bump-major
bump-major: requirements
bumpversion major
.PHONY: bump-minor
bump-minor: requirements
bumpversion minor
.PHONY: bump-patch
bump-patch: requirements
bumpversion patch