-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 1.09 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
.DEFAULT_GOAL := build
CONTAINER_MANAGER ?= docker
CONTAINER_REGISTRY ?= $(AWS_ACCOUNT_ID).dkr.ecr.eu-central-1.amazonaws.com/$(REPOSITORY_NAME)
.PHONY: build
build:
yarn install
yarn build
$(CONTAINER_MANAGER) build -t $(CONTAINER_REGISTRY) .
.PHONY: run
run:
$(CONTAINER_MANAGER) run --rm --name $(REPOSITORY_NAME) -p 8080:80 $(CONTAINER_REGISTRY)
.PHONY: create-repository
create-repository:
aws ecr create-repository --repository-name $(REPOSITORY_NAME)
.PHONY: ecr/login
ecr/login:
$$(aws ecr get-login --no-include-email --region eu-central-1)
.PHONY: github/login
github/login:
echo $(GITHUB_CR_PAT) | $(CONTAINER_MANAGER) login ghcr.io -u $(GITHUB_USER) --password-stdin
.PHONY: publish
publish: build
$(CONTAINER_MANAGER) push $(CONTAINER_REGISTRY)
.PHONY: ecr/describe
ecr/describe:
aws ecr describe-images --repository-name $(REPOSITORY_NAME)
.PHONY: rollout
rollout:
kubectl -n technology-radar rollout restart deployment technology-radar
.PHONY: install
install:
helm upgrade --install technology-radar --namespace technology-radar --set "image.repository=$(CONTAINER_REGISTRY)" .helm