forked from che-incubator/kubernetes-image-puller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (23 loc) · 804 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
BINARY_NAME=kubernetes-image-puller
DOCKERIMAGE_NAME=kubernetes-image-puller
DOCKERIMAGE_TAG=latest
all: build docker
.PHONY: build docker
build: test
GOOS=linux go build -v -o ./bin/${BINARY_NAME} ./cmd/main.go
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo -o ./bin/sleep ./sleep/sleep.go
lint:
golangci-lint run -v
test:
go test -v ./cfg... ./pkg... ./sleep... ./utils...
docker:
docker build -t ${DOCKERIMAGE_NAME}:${DOCKERIMAGE_TAG} -f ./docker/Dockerfile .
docker-dev: build
docker build -t ${DOCKERIMAGE_NAME}:${DOCKERIMAGE_TAG} -f ./docker/dev.Dockerfile .
local-setup:
oc process -f ./deploy/serviceaccount.yaml | oc apply -f -
local-deploy:
oc apply -f ./deploy/configmap.yaml
oc process -f ./deploy/app.yaml | oc apply -f -
clean:
rm -rf ./bin