Skip to content
Snippets Groups Projects
Commit 0ca78b1f authored by Alex Ellis's avatar Alex Ellis
Browse files

Use license-check in the auth plugin


Signed-off-by: default avatarAlex Ellis <alexellis2@gmail.com>
parent b275a201
No related branches found
No related tags found
No related merge requests found
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment