diff --git a/.promu.yml b/.promu.yml new file mode 100644 index 000000000..b23b5618a --- /dev/null +++ b/.promu.yml @@ -0,0 +1,36 @@ +repository: + path: github.com/coreos/prometheus-operator +build: + flags: -a -tags netgo + binaries: + - name: operator + path: ./cmd/operator +tarball: + files: + - LICENSE + - NOTICE +crossbuild: + platforms: + - linux/amd64 + #- linux/386 + #- darwin/amd64 + #- darwin/386 + #- windows/amd64 + #- windows/386 + #- freebsd/amd64 + #- freebsd/386 + #- openbsd/amd64 + #- openbsd/386 + #- netbsd/amd64 + #- netbsd/386 + #- dragonfly/amd64 + #- linux/arm + #- linux/arm64 + #- freebsd/arm + #- openbsd/arm + #- linux/mips64 + #- linux/mips64le + #- netbsd/arm + #- linux/ppc64 + #- linux/ppc64le + diff --git a/Makefile b/Makefile index 2ad6eeafc..4bea401e5 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,17 @@ REPO?=quay.io/coreos/prometheus-operator TAG?=$(shell git rev-parse --short HEAD) NAMESPACE?=prometheus-operator-e2e-tests-$(shell LC_CTYPE=C tr -dc a-z0-9 < /dev/urandom | head -c 13 ; echo '') +PROMU := $(GOPATH)/bin/promu +PREFIX ?= $(shell pwd) + CLUSTER_IP?=$(shell minikube ip) pkgs = $(shell go list ./... | grep -v /vendor/ | grep -v /test/) all: check-license format build test -build: - go build github.com/coreos/prometheus-operator/cmd/operator +build: promu + @$(PROMU) build --prefix $(PREFIX) test: @go test -short $(pkgs) @@ -38,4 +41,9 @@ clean-e2e: kubectl -n $(NAMESPACE) delete prometheus,alertmanager,servicemonitor,statefulsets,deploy,svc,endpoints,pods,cm --all kubectl delete namespace $(NAMESPACE) +promu: + @GOOS=$(shell uname -s | tr A-Z a-z) \ + GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \ + go get -u github.com/prometheus/promu + .PHONY: all build test format check-license container e2e-test e2e-status e2e clean-e2e diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..888510e40 --- /dev/null +++ b/VERSION @@ -0,0 +1,2 @@ +0.2.3 +