mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Switch to dep for dependency management
I find it to be a bit faster in some cases, and easier to work with.
This commit is contained in:
parent
2984604be8
commit
ad1837e9b5
6 changed files with 901 additions and 608 deletions
14
Makefile
14
Makefile
|
|
@ -31,14 +31,14 @@ endif
|
|||
|
||||
all: build
|
||||
build: vendor
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -tags netgo -o $(OUT_DIR)/$(ARCH)/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) go build -tags netgo -o $(OUT_DIR)/$(ARCH)/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
|
||||
|
||||
docker-build: vendor
|
||||
cp deploy/Dockerfile $(TEMP_DIR)
|
||||
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
|
||||
|
||||
docker run -it -v $(TEMP_DIR):/build -v $(shell pwd):/go/src/github.com/directxman12/k8s-prometheus-adapter -e GOARCH=$(ARCH) $(GOIMAGE) /bin/bash -c "\
|
||||
CGO_ENABLED=0 go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter"
|
||||
CGO_ENABLED=0 go build -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter"
|
||||
|
||||
docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR)
|
||||
rm -rf $(TEMP_DIR)
|
||||
|
|
@ -54,13 +54,13 @@ push: ./manifest-tool $(addprefix push-,$(ALL_ARCH))
|
|||
curl -sSL https://github.com/estesp/manifest-tool/releases/download/v0.5.0/manifest-tool-linux-amd64 > manifest-tool
|
||||
chmod +x manifest-tool
|
||||
|
||||
vendor: glide.lock
|
||||
vendor: Gopkg.lock
|
||||
ifeq ($(VENDOR_DOCKERIZED),1)
|
||||
docker run -it -v $(shell pwd):/go/src/github.com/directxman12/k8s-prometheus-adapter -w /go/src/github.com/directxman12/k8s-prometheus-adapter golang:1.8 /bin/bash -c "\
|
||||
curl https://glide.sh/get | sh \
|
||||
&& glide install -v"
|
||||
docker run -it -v $(shell pwd):/go/src/github.com/directxman12/k8s-prometheus-adapter -w /go/src/github.com/directxman12/k8s-prometheus-adapter golang:1.10 /bin/bash -c "\
|
||||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \
|
||||
&& dep ensure -vendor-only"
|
||||
else
|
||||
glide install -v
|
||||
dep ensure -vendor-only
|
||||
endif
|
||||
|
||||
test: vendor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue