-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (30 loc) · 980 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
# Makefile for building publishing container
PROJECT = fortigate-backup
VERSION = $(shell whoami)
REGISTRY = local
GITHASH = $(shell git rev-parse HEAD | cut -c 1-7)
APP_IMAGE = $(PROJECT):$(GITHASH)
CONTAINER_TAG = latest
imageLocal:
docker build -t $(APP_IMAGE) .
.PHONY: imageLocal
imageOnly:
docker build -t $(APP_IMAGE) .
.PHONY: image
image: imageOnly
docker push $(APP_IMAGE)
.PHONY: image
publish-image: image
docker tag $(APP_IMAGE) $(REGISTRY)/$(PROJECT):$(GITHASH)
docker tag $(APP_IMAGE) $(REGISTRY)/$(PROJECT):$(CONTAINER_TAG)
docker push $(REGISTRY)/$(PROJECT):$(GITHASH)
docker push $(REGISTRY)/$(PROJECT):$(CONTAINER_TAG)
.PHONY: publish-image
testLocal:
docker build -f Dockerfile.test -t pystacks-local-test .
docker build -f Dockerfile.check -t pystacks-local-check .
.PHONY: testLocal
coverageLocal:
nosetests --with-coverage -v --cover-package=PyStacks --cover-html --cover-html-dir=coverage
open ./coverage/index.html
.PHONY:coverageLocal