Skip to content

Commit f8a0aa1

Browse files
Merge pull request #19 from simonpasquier/fix-internal-builds
Add operator-no-deps target for offline builds
2 parents 312591f + ec13584 commit f8a0aa1

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/coreos/prometheus-operator
33
COPY . .
4-
RUN make operator
4+
RUN make operator-no-deps
55

66
FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
77
COPY --from=builder /go/src/github.com/coreos/prometheus-operator/operator /usr/bin/

Dockerfile.rhel7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/coreos/prometheus-operator
33
COPY . .
4-
RUN make operator
4+
RUN make operator-no-deps
55

66
FROM registry.svc.ci.openshift.org/ocp/4.0:base
77
COPY --from=builder /go/src/github.com/coreos/prometheus-operator/operator /usr/bin/

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ clean:
4343
build: operator prometheus-config-reloader k8s-gen
4444

4545
.PHONY: operator
46-
operator: $(GOLANG_FILES)
46+
operator: $(GOLANG_FILES) operator-no-deps
47+
48+
.PHONY: operator-no-deps
49+
operator-no-deps:
4750
GOOS=linux CGO_ENABLED=0 go build \
4851
-ldflags "-X $(GO_PKG)/pkg/version.Version=$(shell cat VERSION)" \
49-
-o $@ cmd/operator/main.go
52+
-o operator cmd/operator/main.go
5053

5154
.PHONY: prometheus-config-reloader
5255
prometheus-config-reloader:

0 commit comments

Comments
 (0)