forked from eurica/splunk_app_pagerduty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·70 lines (46 loc) · 1.57 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
68
69
70
# Makefile for splunk_app_pagerduty.
#
# Home:: https://github.com/ampledata/splunk_app_pagerduty
# Author:: Greg Albrecht <mailto:[email protected]>
# Copyright:: Copyright 2012 Splunk, Inc.
# License:: Apache License 2.0
#
.DEFAULT_GOAL := all
all: install_requirements install_gemset librarian_update
install_requirements:
pip install -r requirements.txt --use-mirrors
build: clean
tar -X .tar_exclude -zcpf splunk_app_pagerduty.spl ../splunk_app_pagerduty
vagrant_up:
vagrant up
vagrant: vagrant_up
lint:
pylint -f parseable -i y -r y bin/*.py tests/*.py | tee pylint.log
flake8:
flake8 --exit-zero --max-complexity 12 bin/*.py tests/*.py | \
awk -F\: '{printf "%s:%s: [E]%s\n", $$1, $$2, $$3}' | tee flake8.log
pep8: flake8
clonedigger:
clonedigger --cpd-output .
nosetests:
nosetests
test: all lint flake8 clonedigger nosetests
install:
vagrant ssh -c 'sudo /opt/splunk/bin/splunk install app /vagrant/splunk_app_pagerduty.spl -update true -auth admin:changeme'
vagrant ssh -c 'sudo /opt/splunk/bin/splunk restart'
add_input:
vagrant ssh -c 'sudo /opt/splunk/bin/splunk add monitor /var/log -auth admin:changeme'
generate_events:
vagrant ssh -c 'logger -t generated ERROR'
clean:
rm -rf *.egg* build dist *.pyc *.pyo cover doctest_pypi.cfg nosetests.xml \
pylint.log *.egg output.xml flake8.log output.xml */*.pyc .coverage *.spl
install_gemset:
rvm gemset import pagerduty.gems
librarian_update:
librarian-chef update
vagrant_provision:
vagrant provision
vagrant_destroy:
vagrant destroy -f
nuke: vagrant_destroy clean all vagrant_up build install add_input