forked from anaconda/odh-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (53 loc) · 1.34 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
DEFAULT_ENV_FILE := .env
ifneq ("$(wildcard $(DEFAULT_ENV_FILE))","")
include ${DEFAULT_ENV_FILE}
export $(shell sed 's/=.*//' ${DEFAULT_ENV_FILE})
endif
ENV_FILE := .env.local
ifneq ("$(wildcard $(ENV_FILE))","")
include ${ENV_FILE}
export $(shell sed 's/=.*//' ${ENV_FILE})
endif
##################################
# DEV Convenience
reinstall: build push undeploy deploy
##################################
# DEV - run apps locally for development
.PHONY: dev-frontend
dev-frontend:
./install/dev-frontend.sh
.PHONY: dev-backend
dev-backend:
./install/dev-backend.sh
.PHONY: dev
dev:
./install/dev.sh
##################################
# BUILD - build image locally using s2i
.PHONY: build
build:
./install/build.sh
##################################
# PUSH - push image to repository
.PHONY: push
push:
./install/push.sh
##################################
.PHONY: login
login:
ifdef OC_TOKEN
$(info **** Using OC_TOKEN for login ****)
oc login ${OC_URL} --token=${OC_TOKEN}
else
$(info **** Using OC_USER and OC_PASSWORD for login ****)
oc login ${OC_URL} -u ${OC_USER} -p ${OC_PASSWORD} --insecure-skip-tls-verify=true
endif
##################################
.PHONY: deploy
deploy: login
./install/deploy.sh
##################################
.PHONY: undeploy
undeploy: login
./install/undeploy.sh
##################################