-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
44 lines (36 loc) · 866 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NAME=ml-kubeflow
TAG_PREFIX=neural-tpps
VERSION=$(shell git rev-parse HEAD)
REPO=quay.io/babylonhealth
TAG=$(TAG_PREFIX)-$(VERSION)
IMAGE=$(REPO)/$(NAME):$(TAG)
IMAGE_BASE=$(REPO)/$(NAME):$(TAG_PREFIX)-base
.PHONY: build
build:
docker build --file Dockerfile -t $(IMAGE) .
.PHONY: build-base
build-base:
docker build --file Dockerfile-base -t $(IMAGE_BASE) .
.PHONY: publish
publish: check_clean build push update_deploy
.PHONY: check_clean
check_clean:
git diff-index --quiet HEAD || (\
echo "Working directory is not clean! Commit before publishing"; \
exit 1;)
.PHONY: tag
tag:
git tag $(TAG)
git push --tags
docker push $(IMAGE)
.PHONY: push
push:
git push --tags
docker push $(IMAGE)
.PHONY: push-base
push-base:
git push --tags
docker push $(IMAGE_BASE)
.PHONY: update_deploy
update_deploy:
python deploy/update_deploy.py --image $(IMAGE)