mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 21:06:54 +00:00
Use license-check in the auth plugin
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
b275a2010c
commit
0ca78b1fab
@ -1,13 +1,17 @@
|
|||||||
FROM golang:1.10.4-alpine3.8 as build
|
FROM golang:1.10-alpine3.9 as build
|
||||||
|
|
||||||
|
RUN apk add --no-cache curl ca-certificates
|
||||||
|
RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \
|
||||||
|
&& mv ./license-check /usr/bin/
|
||||||
|
|
||||||
RUN mkdir -p /go/src/handler
|
|
||||||
WORKDIR /go/src/handler
|
WORKDIR /go/src/handler
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Run a gofmt and exclude all vendored code.
|
# Run a gofmt and exclude all vendored code.
|
||||||
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))"
|
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux \
|
RUN license-check -path ./ --verbose=false "OpenFaaS Authors" "OpenFaaS Author(s)" \
|
||||||
|
&& test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))" \
|
||||||
|
&& CGO_ENABLED=0 GOOS=linux \
|
||||||
go build --ldflags "-s -w" -a -installsuffix cgo -o handler . && \
|
go build --ldflags "-s -w" -a -installsuffix cgo -o handler . && \
|
||||||
go test $(go list ./... | grep -v /vendor/) -cover
|
go test $(go list ./... | grep -v /vendor/) -cover
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user