File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN go mod download
1212
1313# # Bring in everything else and build an amd64 image
1414COPY . .
15- RUN GOOS=linux GOARCH=amd64 go install .
15+ RUN make install
1616
1717# STAGE 2
1818# Use a distroless nonroot base image for just our executable
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ VERSION:=$(shell $(ROOT_DIR)/hack/getversion)
44COMMIT: =$(shell git rev-list -1 HEAD)
55DATE: =$(shell date -uR)
66GOVERSION: =$(shell go version | awk '{print $$3 " " $$4}')
7+ GOOS: =$(shell go env GOOS)
8+ GOARCH: =$(shell go env GOARCH)
79
810DOCKER_IMAGE? =quay.io/jetstack/preflight
911DOCKER_IMAGE_TAG? =$(DOCKER_IMAGE ) :$(VERSION )
@@ -17,6 +19,7 @@ define LDFLAGS
1719endef
1820
1921GO_BUILD: =go build -ldflags '$(LDFLAGS ) '
22+ GO_INSTALL: =go install -ldflags '$(LDFLAGS ) '
2023
2124export GO111MODULE =on
2225
3033build :
3134 cd $(ROOT_DIR ) && $(GO_BUILD ) -o builds/preflight .
3235
36+ install :
37+ cd $(ROOT_DIR ) && $(GO_INSTALL )
38+
3339test :
3440 cd $(ROOT_DIR ) && go test ./...
3541
Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
251251github.com/imdario/mergo v0.3.5 /go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA =
252252github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28 =
253253github.com/imdario/mergo v0.3.6 /go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA =
254+ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM =
254255github.com/inconshreveable/mousetrap v1.0.0 /go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8 =
255256github.com/influxdata/flux v0.13.0 /go.mod h1:81jeDcHVn1rN5uj9aQ81S72Q8ol8If7N0zM0G8TnxTE =
256257github.com/influxdata/influxdb v1.7.2 /go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY =
You can’t perform that action at this time.
0 commit comments