-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (26 loc) · 884 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
IMAGE_REPO = docker.io/bollohz
IMAGE_NAME = exporters-webhook
IMAGE_TAG = 1.0.6
APP = exporters-webhook
NAMESPACE = utils
CSR_NAME = exporters-webhook.utils.svc
.PHONY:build scan image
build:
@echo "Building docker image..."
@docker build -t $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG) .
image:
@echo "Baking the image...."
$(MAKE) build
$(MAKE) push
.PHONY:push
push:
@echo "Pushing the docker image for $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG) and $(IMAGE_REPO)/$(IMAGE_NAME):latest..."
@docker tag $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG) $(IMAGE_REPO)/$(IMAGE_NAME):latest
@docker push $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
@docker push $(IMAGE_REPO)/$(IMAGE_NAME):latest
scan:
@echo "Scanning docker image with SNYK..."
@docker scan $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
release-chart:
@echo "Releasing chart..."
./helm/release_chart.sh $(NAMESPACE)