Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.68 KB
/
Copy pathMakefile
File metadata and controls
60 lines (46 loc) · 1.68 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
56
57
58
59
60
KITCHEN_SUITES := \
catalog-web \
catalog-harvester \
crm-web \
dashboard-web \
efk-nginx \
efk-stack \
inventory-web \
jekyll \
logrotate \
web-proxy \
unattended-upgrades
MOLECULE_SUITES := \
software/ci \
software/ckan/native-login \
software/common/tls
# Create test-kitchen-<suite> targets
KITCHEN_SUITE_TARGETS := $(patsubst %,test-kitchen-%,$(KITCHEN_SUITES))
# Create test-molecule-<suite> targets
MOLECULE_SUITE_TARGETS := $(patsubst %,test-molecule-%,$(MOLECULE_SUITES))
# Used for parallelization on CircleCI. See `circleci tests glob`.
# https://circleci.com/docs/2.0/parallelism-faster-jobs/
circleci-glob:
@echo $(KITCHEN_SUITE_TARGETS) $(MOLECULE_SUITE_TARGETS) | sed -e 's/ /\n/g'
update-vendor:
ansible-galaxy install -p ansible/roles/vendor -r ansible/roles/vendor/requirements.yml
update-vendor-verbose:
ansible-galaxy install -p ansible/roles/vendor -r ansible/roles/vendor/requirements.yml -vvv
update-vendor-force:
ansible-galaxy install -p ansible/roles/vendor -r ansible/roles/vendor/requirements.yml --force
update-vendor-force-verbose:
ansible-galaxy install -p ansible/roles/vendor -r ansible/roles/vendor/requirements.yml --force -vvv
setup:
pip install -r requirements.txt
bundle install
lint:
ansible-playbook --syntax-check ansible/*.yml
ansible-lint -v -x ANSIBLE0010 --exclude=ansible/roles/vendor ansible/*.yml
$(KITCHEN_SUITE_TARGETS):
cd ansible && \
bundle exec kitchen test $(subst test-kitchen-,,$@)
$(MOLECULE_SUITE_TARGETS):
cd ansible/roles/$(subst test-molecule-,,$@) && \
molecule test --all
test: $(KITCHEN_SUITE_TARGETS) $(MOLECULE_SUITE_TARGETS)
.PHONY: lint setup test $(KITCHEN_SUITE_TARGETS) $(MOLECULE_SUITE_TARGETS)