mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
separate build the binary and container
This commit is contained in:
parent
5663dd9a81
commit
64502939e2
3 changed files with 7 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/operator
|
||||
.build/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
FROM quay.io/prometheus/busybox:latest
|
||||
|
||||
ADD operator /bin/operator
|
||||
ADD .build/linux-amd64/operator /bin/operator
|
||||
|
||||
ENTRYPOINT ["/bin/operator"]
|
||||
ENTRYPOINT ["/bin/operator"]
|
||||
|
|
6
Makefile
6
Makefile
|
@ -14,6 +14,9 @@ all: check-license format build test
|
|||
build: promu
|
||||
@$(PROMU) build --prefix $(PREFIX)
|
||||
|
||||
crossbuild: promu
|
||||
@$(PROMU) crossbuild
|
||||
|
||||
test:
|
||||
@go test -short $(pkgs)
|
||||
|
||||
|
@ -24,7 +27,6 @@ check-license:
|
|||
./scripts/check_license.sh
|
||||
|
||||
container:
|
||||
GOOS=linux $(MAKE) build
|
||||
docker build -t $(REPO):$(TAG) .
|
||||
|
||||
e2e-test:
|
||||
|
@ -46,4 +48,4 @@ promu:
|
|||
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
|
||||
.PHONY: all build crossbuild test format check-license container e2e-test e2e-status e2e clean-e2e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue