-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (32 loc) · 1.16 KB
/
Makefile
File metadata and controls
46 lines (32 loc) · 1.16 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
REPOSITORY=500669969333.dkr.ecr.us-east-1.amazonaws.com/ethereum-proxy
TAG=`git describe --abbrev=1 --tags --always`
IMAGE="$(REPOSITORY):v$(TAG)"
default: build
tag:
@echo "Current tag is '$(TAG)'"
image:
@echo "Current image is '$(IMAGE)'"
build:
@echo "## Building the docker image ##"
@docker build -t $(IMAGE) .
login:
`aws ecr get-login --no-include-email`
push: login
@echo "## Pushing image to AWS ##"
@docker push $(IMAGE)
use-staging:
@echo "## Using staging ##"
@aws eks update-kubeconfig --name kubernetes-staging --region us-east-1
use-production:
@echo "## Using production ##"
@aws eks update-kubeconfig --name kubernetes-production-1-15 --region us-east-1
deploy-staging: build push use-staging deploy-current-cluster-context
@echo "## Deployed to staging ##"
deploy-production: build push use-production deploy-current-cluster-context
@echo "## Deployed to production ##"
deploy-current-cluster-context:
@kubectl set image deployment/ethereum-proxy-api ethereum-proxy=$(IMAGE) -n ethereum-proxy
ssh-staging: use-staging ssh-current-context
ssh-production: use-production ssh-current-context
ssh-current-context:
./scripts/ssh ethereum-proxy api