forked from RedHatInsights/insights-host-inventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (42 loc) · 1.64 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
.PHONY: init test run_inv_mq_service
init:
pipenv shell
test:
pytest --cov=.
upgrade_db:
SQLALCHEMY_ENGINE_LOG_LEVEL=INFO FLASK_APP=manage.py flask db upgrade
run_inv_web_service:
# Set the "KAFKA_TOPIC", "KAFKA_GROUP", "KAFKA_BOOTSTRAP_SERVERS" environment variables
# if you want the system_profile message queue consumer and event producer to be started
#
# KAFKA_TOPIC="platform.system-profile" KAFKA_GROUP="inventory" KAFKA_BOOTSTRAP_SERVERS="localhost:29092"
#
INVENTORY_LOG_LEVEL=DEBUG BYPASS_RBAC=true BYPASS_TENANT_TRANSLATION=true gunicorn -b :8080 run:app
run_inv_mq_service:
KAFKA_EVENT_TOPIC=platform.inventory.events PAYLOAD_TRACKER_SERVICE_NAME=inventory-mq-service INVENTORY_LOG_LEVEL=DEBUG BYPASS_TENANT_TRANSLATION=true python3 inv_mq_service.py
run_inv_mq_service_test_producer:
python3 utils/kafka_producer.py
run_inv_mq_service_test_consumer:
python3 utils/kafka_consumer.py
run_inv_http_test_producer:
python3 utils/rest_producer.py
run_reaper:
python3 host_reaper.py
run_pendo_syncher:
python3 pendo_syncher.py
style:
pre-commit run --all-files
scan_project:
./sonarqube.sh
validate-dashboard:
python3 utils/validate_dashboards.py
update-schema:
[ -d swagger/inventory-schemas ] || git clone git@github.com:RedHatInsights/inventory-schemas.git swagger/inventory-schemas
(cd swagger/inventory-schemas && git pull)
cp \
swagger/inventory-schemas/schemas/system_profile/v1.yaml \
swagger/system_profile.spec.yaml
( cd swagger/inventory-schemas; set +e;git rev-parse HEAD) > swagger/system_profile_commit_id
git add swagger/system_profile.spec.yaml
git add swagger/system_profile_commit_id
git diff --cached