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
12
12
13
13
# # Bring in everything else and build an amd64 image
14
14
COPY . .
15
- RUN GOOS=linux GOARCH=amd64 go install .
15
+ RUN make install
16
16
17
17
# STAGE 2
18
18
# 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)
4
4
COMMIT: =$(shell git rev-list -1 HEAD)
5
5
DATE: =$(shell date -uR)
6
6
GOVERSION: =$(shell go version | awk '{print $$3 " " $$4}')
7
+ GOOS: =$(shell go env GOOS)
8
+ GOARCH: =$(shell go env GOARCH)
7
9
8
10
DOCKER_IMAGE? =quay.io/jetstack/preflight
9
11
DOCKER_IMAGE_TAG? =$(DOCKER_IMAGE ) :$(VERSION )
@@ -17,6 +19,7 @@ define LDFLAGS
17
19
endef
18
20
19
21
GO_BUILD: =go build -ldflags '$(LDFLAGS ) '
22
+ GO_INSTALL: =go install -ldflags '$(LDFLAGS ) '
20
23
21
24
export GO111MODULE =on
22
25
30
33
build :
31
34
cd $(ROOT_DIR ) && $(GO_BUILD ) -o builds/preflight .
32
35
36
+ install :
37
+ cd $(ROOT_DIR ) && $(GO_INSTALL )
38
+
33
39
test :
34
40
cd $(ROOT_DIR ) && go test ./...
35
41
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
251
251
github.com/imdario/mergo v0.3.5 /go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA =
252
252
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28 =
253
253
github.com/imdario/mergo v0.3.6 /go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA =
254
+ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM =
254
255
github.com/inconshreveable/mousetrap v1.0.0 /go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8 =
255
256
github.com/influxdata/flux v0.13.0 /go.mod h1:81jeDcHVn1rN5uj9aQ81S72Q8ol8If7N0zM0G8TnxTE =
256
257
github.com/influxdata/influxdb v1.7.2 /go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY =
You can’t perform that action at this time.
0 commit comments