forked from canonical/discourse-k8s-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (36 loc) · 1.21 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
DISCOURSE_VERSION ?= v2.7.10
IMAGE_VERSION ?= $(DISCOURSE_VERSION)
IMAGE_NAME ?=discourse
blacken:
@echo "Normalising python layout with black."
@tox -e black
lint: blacken
@echo "Running flake8"
@tox -e lint
unittest:
@tox -e unit
test: lint unittest
clean:
@echo "Cleaning files"
@git clean -fXd
build-image:
@echo "Building the default image."
@docker build \
--no-cache=true \
--build-arg CONTAINER_APP_VERSION='$(DISCOURSE_VERSION)' \
-t $(IMAGE_NAME):$(IMAGE_VERSION) \
image/
build-image-markdown-saml:
@echo "Building the markdown-saml image."
@docker build \
--no-cache=true \
--build-arg CONTAINER_APP_VERSION='$(DISCOURSE_VERSION)' \
-t $(IMAGE_NAME)-markdown-saml:$(IMAGE_VERSION) \
--target markdown-saml \
image/
push-image-local-registry:
@echo "Pushing the default image to local registry."
@docker tag $(IMAGE_NAME):$(IMAGE_VERSION) localhost:32000/$(IMAGE_NAME):$(IMAGE_VERSION)
@docker push localhost:32000/$(IMAGE_NAME):$(IMAGE_VERSION)
@echo "Image available at: localhost:32000/$(IMAGE_NAME):$(IMAGE_VERSION)"
.PHONY: blacken lint test unittest clean build-image