forked from sensu/sensu-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 733 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 733 Bytes
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
# Shell to use for running scripts
export SHELL := /bin/bash
# Get docker path or an empty string
DOCKER := $(shell command -v docker)
DOCKER_IMAGE = objectrocket/sensu-backend
# allow builds without tags
IMAGE_VERSION ?= latest
# Test if the dependencies we need to run this Makefile are installed
deps-development:
ifndef DOCKER
@echo "Docker is not available. Please install docker"
@exit 1
endif
.PHONY: test
test:
@./build.sh unit
.PHONY: integration
integration:
@./build.sh integration
.PHONY: clean
clean:
@go clean
docker-build: deps-development
docker build --build-arg APPVERSION=$(IMAGE_VERSION) -t $(DOCKER_IMAGE):$(IMAGE_VERSION) .
docker-push: docker-build
docker push $(DOCKER_IMAGE):$(IMAGE_VERSION)