-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added vendor folder and suggested fixes
Signed-off-by: Rishabh Gupta<[email protected]>
- Loading branch information
Showing
22 changed files
with
735 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
FROM golang:1.9.2 as builder | ||
RUN mkdir -p /go/src/github.com/openfaas-incubator/connector | ||
WORKDIR /go/src/github.com/openfaas-incubator/connector | ||
FROM golang:1.10.4 as builder | ||
RUN mkdir -p /go/src/github.com/openfaas-incubator/connector-sdk | ||
WORKDIR /go/src/github.com/openfaas-incubator/connector-sdk | ||
|
||
COPY vendor vendor | ||
COPY main.go . | ||
|
||
RUN go get -d -v ./... | ||
# Run a gofmt and exclude all vendored code. | ||
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))" | ||
|
||
RUN go test -v ./... | ||
|
||
# Stripping via -ldflags "-s -w" | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o ./connector | ||
|
||
FROM alpine | ||
FROM alpine:3.8 | ||
|
||
RUN addgroup -S app \ | ||
&& adduser -S -g app app | ||
|
||
WORKDIR /home/app | ||
|
||
COPY --from=builder /go/src/github.com/openfaas-incubator/connector-sdk/ . | ||
|
||
RUN chown -R app:app ./ | ||
|
||
COPY --from=builder /go/src/github.com/openfaas-incubator/connector/connector /bin/connector | ||
USER app | ||
|
||
CMD ["/bin/connector"] | ||
CMD ["./connector"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
FROM golang:1.9.2 as builder | ||
RUN mkdir -p /go/src/github.com/openfaas-incubator/connector | ||
WORKDIR /go/src/github.com/openfaas-incubator/connector | ||
FROM golang:1.10.4 as builder | ||
RUN mkdir -p /go/src/github.com/openfaas-incubator/connector-sdk | ||
WORKDIR /go/src/github.com/openfaas-incubator/connector-sdk | ||
|
||
COPY vendor vendor | ||
COPY main.go . | ||
|
||
RUN go get -d -v ./... | ||
# Run a gofmt and exclude all vendored code. | ||
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))" | ||
|
||
RUN go test -v ./... | ||
|
||
# Stripping via -ldflags "-s -w" | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o ./connector | ||
RUN GOARM=7 CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o ./connector | ||
|
||
FROM alpine | ||
FROM alpine:3.8 | ||
|
||
COPY --from=builder /go/src/github.com/openfaas-incubator/connector/connector /bin/connector | ||
COPY --from=builder /go/src/github.com/openfaas-incubator/connector-sdk/ . | ||
|
||
CMD ["/bin/connector"] | ||
CMD ["./connector"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Gopkg.toml example | ||
# | ||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html | ||
# for detailed Gopkg.toml documentation. | ||
# | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project" | ||
# version = "1.0.0" | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project2" | ||
# branch = "dev" | ||
# source = "github.com/myfork/project2" | ||
# | ||
# [[override]] | ||
# name = "github.com/x/y" | ||
# version = "2.4.0" | ||
# | ||
# [prune] | ||
# non-go = false | ||
# go-tests = true | ||
# unused-packages = true | ||
|
||
|
||
[[constraint]] | ||
name = "github.com/openfaas-incubator/connector-sdk" | ||
version = "0.2.0" | ||
|
||
[prune] | ||
go-tests = true | ||
unused-packages = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
cmd/tester/vendor/github.com/openfaas-incubator/connector-sdk/LICENSE
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
78 changes: 78 additions & 0 deletions
78
cmd/tester/vendor/github.com/openfaas-incubator/connector-sdk/types/controller.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
cmd/tester/vendor/github.com/openfaas-incubator/connector-sdk/types/credentials.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.