-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 1.24 KB
/
Makefile
File metadata and controls
36 lines (28 loc) · 1.24 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
.PHONY: help run_dev run_prod clean put_mapping put_data drop_index trigger_github
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
run_dev: clean
./run_dev.sh > temp.log
run_prod:
./run_prod.sh
clean:
git checkout last_timestamp.txt
rm -f temp.log
put_mapping:
@echo "putting a new mapping"
@curl -u ${ES_USERNAME}:${ES_PASSWORD} --http1.1 -XPUT https://k8s.kkweon.dev/elastic/slack -H 'Content-Type: application/x-ndjson' --data-binary '@elasticsearch_utils/mapping.json'
@echo "done puttng a new mapping"
put_data:
@echo "putting data"
@curl -u ${ES_USERNAME}:${ES_PASSWORD} --http1.1 -XPUT https://k8s.kkweon.dev/elastic/slack/_bulk -H 'Content-Type: application/x-ndjson' --data-binary '@temp.log'
@echo "done putting data"
drop_index:
@echo "dropping index"
@curl -u ${ES_USERNAME}:${ES_PASSWORD} -XDELETE https://k8s.kkweon.dev/elastic/slack
@echo "done dropping index"
trigger_github:
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${GITHUB_API_KEY}" \
--request POST \
--data '{"event_type": "manual-trigger"}' \
https://api.github.com/repos/dl4ab/DFAB-Archiver-slackbot/dispatches