1 Star 1 Fork 0

zangxueyuan/kube-prometheus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
SHELL=/bin/bash -o pipefail
JSONNET_ARGS := -n 2 --max-blank-lines 2 --string-style s --comment-style s
ifneq (,$(shell which jsonnetfmt))
JSONNET_FMT_CMD := jsonnetfmt
else
JSONNET_FMT_CMD := jsonnet
JSONNET_FMT_ARGS := fmt $(JSONNET_ARGS)
endif
JSONNET_FMT := $(JSONNET_FMT_CMD) $(JSONNET_FMT_ARGS)
FIRST_GOPATH:=$(firstword $(subst :, ,$(shell go env GOPATH)))
JB_BINARY:=$(FIRST_GOPATH)/bin/jb
EMBEDMD_BINARY := embedmd
CONTAINER_CMD:=docker run --rm \
-e http_proxy -e https_proxy -e no_proxy \
-u="$(shell id -u):$(shell id -g)" \
-v "$(shell go env GOCACHE):/.cache/go-build" \
-v "$(PWD):/go/src/github.com/coreos/kube-prometheus:Z" \
-w "/go/src/github.com/coreos/kube-prometheus" \
quay.io/coreos/jsonnet-ci
all: generate fmt test
.PHONY: generate-in-docker
generate-in-docker:
@echo ">> Compiling assets and generating Kubernetes manifests"
$(CONTAINER_CMD) make $(MFLAGS) generate
.PHONY: clean
clean:
# Remove all files and directories ignored by git.
git clean -Xfd .
generate: manifests **.md
**.md: $(shell find examples) build.sh example.jsonnet
$(EMBEDMD_BINARY) -w `find . -name "*.md" | grep -v vendor`
manifests: examples/kustomize.jsonnet vendor build.sh
rm -rf manifests
./build.sh $<
vendor: $(JB_BINARY) jsonnetfile.json jsonnetfile.lock.json
rm -rf vendor
$(JB_BINARY) install
fmt:
find . -name 'vendor' -prune -o -name '*.libsonnet' -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNET_FMT) -i
test: $(JB_BINARY)
$(JB_BINARY) install
./test.sh
test-e2e:
go test -timeout 55m -v ./tests/e2e -count=1
test-in-docker:
@echo ">> Compiling assets and generating Kubernetes manifests"
$(CONTAINER_CMD) make $(MFLAGS) test
.PHONY: generate generate-in-docker test test-in-docker fmt
$(JB_BINARY):
go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/alldevops/kube-prometheus.git
git@gitee.com:alldevops/kube-prometheus.git
alldevops
kube-prometheus
kube-prometheus
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385