-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
40 lines (30 loc) · 1.35 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
requirements.txt: Pipfile Pipfile.lock
@pipenv requirements > requirements.txt
login-ecr:
@aws ecr get-login-password --region us-west-2 | docker login \
--username AWS \
--password-stdin 931437602538.dkr.ecr.us-west-2.amazonaws.com
build-runner: requirements.txt
@docker build . -t hivdb/codfreq-runner:latest
release-runner: build-runner login-ecr deploy-profiles
@docker push hivdb/codfreq-runner:latest
@docker tag hivdb/codfreq-runner:latest 931437602538.dkr.ecr.us-west-2.amazonaws.com/hivdb/codfreq-runner:latest
@docker push 931437602538.dkr.ecr.us-west-2.amazonaws.com/hivdb/codfreq-runner:latest
build-controller:
@mkdir -p build
@rm build/codfreq-controller.zip 2>/dev/null || true
@zip -j build/codfreq-controller.zip lambda-controller/main.py
init-controller: build-controller
@lambda-controller/init_lambda.sh fileb://$(realpath build/codfreq-controller.zip)
deploy-controller: build-controller
@lambda-controller/update_lambda.sh fileb://$(realpath build/codfreq-controller.zip)
syncrefs:
@pipenv run aws s3 sync refs s3://codfreq-assets.hivdb.org/refs
debug-runner:
@docker run -it --rm \
--volume $(PWD)/local:/local:rw \
--volume ~/.aws:/root/.aws:ro \
hivdb/codfreq-runner:latest bash
deploy-profiles:
@aws s3 sync profiles s3://codfreq-assets.hivdb.org/profiles --delete
.PHONY: login-ecr *-runner *-controller deploy-profiles