mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-14 08:16:31 +00:00
Build system: Introduce promu to prometheus-operator
Add 'promu.yml' and 'VERSION' file and replace build recipe to use promu.
This commit is contained in:
parent
391c9c5fc0
commit
3bd1968e5c
3 changed files with 48 additions and 2 deletions
36
.promu.yml
Normal file
36
.promu.yml
Normal file
|
@ -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
|
||||
|
12
Makefile
12
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
|
||||
|
|
2
VERSION
Normal file
2
VERSION
Normal file
|
@ -0,0 +1,2 @@
|
|||
0.2.3
|
||||
|
Loading…
Add table
Reference in a new issue