-
Notifications
You must be signed in to change notification settings - Fork 45
/
Makefile
41 lines (30 loc) · 1.12 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
REGISTRY?=quay.io
DEFAULT_TAG=latest
TESTS_IMAGE=worker-tests
ifeq ($(TARGET), rhel)
DOCKERFILE := Dockerfile.rhel
REPOSITORY ?= openshiftio/rhel-bayesian-cucos-worker
else
DOCKERFILE := Dockerfile
REPOSITORY ?= openshiftio/bayesian-cucos-worker
endif
.PHONY: all docker-build fast-docker-build test get-image-name get-image-repository
all: fast-docker-build
docker-build:
docker build --no-cache -t $(REGISTRY)/$(REPOSITORY):$(DEFAULT_TAG) -f $(DOCKERFILE) .
docker tag $(REGISTRY)/$(REPOSITORY):$(DEFAULT_TAG) $(REPOSITORY):$(DEFAULT_TAG)
docker-build-tests: docker-build
docker build --no-cache -t $(TESTS_IMAGE) -f Dockerfile.tests .
fast-docker-build:
docker build -t $(REGISTRY)/$(REPOSITORY):$(DEFAULT_TAG) -f $(DOCKERFILE) .
docker tag $(REGISTRY)/$(REPOSITORY):$(DEFAULT_TAG) $(TESTS_IMAGE):$(DEFAULT_TAG)
fast-docker-build-tests: fast-docker-build
docker build -t $(TESTS_IMAGE) -f Dockerfile.tests .
test: fast-docker-build-tests
./qa/runtest.sh
get-image-name:
@echo $(REGISTRY)/$(REPOSITORY):$(DEFAULT_TAG)
get-image-name-base:
@echo $(REGISTRY)/$(REPOSITORY)
get-image-repository:
@echo $(REPOSITORY)