forked from opendatahub-io/odh-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (46 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
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
CONTAINER_BUILDER?=podman
CONTAINER_DOCKERFILE?=Dockerfile
##################################
# DEV Convenience
reinstall: build push undeploy deploy
##################################
# BUILD - build image locally using s2i
.PHONY: build
build:
echo "Building ${IMAGE_REPOSITORY} from ${CONTAINER_DOCKERFILE}"
${CONTAINER_BUILDER} build -f ${CONTAINER_DOCKERFILE} -t ${IMAGE_REPOSITORY} .
##################################
# PUSH - push image to repository
.PHONY: push
push:
echo "Pushing ${IMAGE_REPOSITORY}"
${CONTAINER_BUILDER} push ${IMAGE_REPOSITORY}
##################################
.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:
./install/deploy.sh
##################################
.PHONY: undeploy
undeploy:
./install/undeploy.sh
##################################