forked from openshift-assisted/assisted-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 822 Bytes
/
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
.PHONY: all build deploy clean
IMAGE := $(or ${IMAGE},quay.io/ocpmetal/ocp-metal-ui:latest)
TESTS_IMAGE := $(or ${TESTS_IMAGE},quay.io/ocpmetal/ocp-metal-ui-tests:latest)
BM_INVENTORY_URL := $(or ${BM_INVENTORY_URL},http://bm-inventory.assisted-installer.svc.cluster.local:8090)
DEPLOY_FILE="deploy/ocp-metal-ui.yaml"
all: build deploy
build:
yarn build
podman build -t $(IMAGE) .
podman build -f Dockerfile.cypress -t $(TESTS_IMAGE) .
podman push $(IMAGE)
podman push $(TESTS_IMAGE)
deploy:
mkdir -p build/deploy/
deploy/deploy_config.sh -u "${BM_INVENTORY_URL}" -i "${IMAGE}" -t deploy/ocp-metal-ui-template.yaml > ${DEPLOY_FILE}
kubectl apply -f ${DEPLOY_FILE}
# TODO(mlibra): Run tests: get UI URL, run run-tests.sh
clean:
rm -f ${DEPLOY_FILE}
kubectl delete deployment,service,configmap ocp-metal-ui