This repository was archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.42 KB
/
Makefile
File metadata and controls
45 lines (37 loc) · 1.42 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
GIT_DESCR = $(shell git describe --always)
# build output folder
OUTPUTFOLDER = dist
# docker image
DOCKER_REGISTRY = 166568770115.dkr.ecr.eu-central-1.amazonaws.com/aeternity
DOCKER_IMAGE = aepp-playground
DOCKER_TAG = $(shell git describe --always --tags)
# k8s
K8S_NAMESPACE = testing
VUE_APP_NODE_URL = https://sdk-testnet.aepps.com
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
clean:
@echo remove $(OUTPUTFOLDER) folder
@rm -rf dist
@echo done
build:
@echo build release
npm install && npm run build
@echo done
docker-build:
@echo build image
docker build -t $(DOCKER_IMAGE) -f Dockerfile .
@echo done
docker-push:
@echo push image
docker tag $(DOCKER_IMAGE) $(DOCKER_REGISTRY)/$(DOCKER_IMAGE):$(DOCKER_TAG)
aws ecr get-login --no-include-email --region eu-central-1 --profile aeternity-sdk | sh
docker push $(DOCKER_REGISTRY)/$(DOCKER_IMAGE):$(DOCKER_TAG)
@echo done
deploy-k8s:
@echo deploy k8s
kubectl -n $(K8S_NAMESPACE) patch deployment $(DOCKER_IMAGE) --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"$(DOCKER_REGISTRY)/$(DOCKER_IMAGE):$(DOCKER_TAG)"}]'
@echo deploy k8s done
debug-start:
VUE_APP_NODE_INTERNAL_URL='$(VUE_APP_NODE_URL)' VUE_APP_NODE_URL='$(VUE_APP_NODE_URL)' yarn start:dev