mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
make build fail when need to run gofmt & remove docker pull in travis
use golang 1.8.3 for gateway Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
This commit is contained in:
parent
38e0a9956f
commit
1b9affabb4
@ -8,7 +8,6 @@ addons:
|
||||
- docker-ce
|
||||
|
||||
before_install:
|
||||
- docker pull golang:1.7.5
|
||||
|
||||
script:
|
||||
- sh build.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM golang:1.7.5 as build
|
||||
FROM golang:1.8.3 as build
|
||||
WORKDIR /go/src/github.com/openfaas/faas/gateway
|
||||
|
||||
COPY vendor vendor
|
||||
|
@ -11,9 +11,9 @@ COPY requesthandler_test.go .
|
||||
COPY types types
|
||||
|
||||
# Run a gofmt and exclude all vendored code.
|
||||
RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))"
|
||||
|
||||
RUN go test
|
||||
RUN go test -v ./...
|
||||
|
||||
# Stripping via -ldflags "-s -w"
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o watchdog . \
|
||||
|
Loading…
x
Reference in New Issue
Block a user