forked from sensu/sensu-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (34 loc) · 877 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
37
38
39
40
41
42
43
44
export GOBIN := $(PWD)/bin
export PATH := $(GOBIN):$(PATH)
export INSTALL_FLAG=
# 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-operator
# 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: all
all: build container
.PHONY: build
build:
@hack/build/operator/build
.PHONY: test
test:
@hack/test
.PHONY: unittest
unittest:
@hack/unit_test
.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)